Unable to import Python statistics library

I have a small python script that should do some simple statistics on some lists of numbers - this is what the statistics.py library looks like. From what I can do from python.org information , it should be part of the standard library in python 3.4.1 (on Win 64 bit), but I'm trying to access functions.

import statistics simply gives “no module named statistics”

Looking through the python34 \ Lib directory, the statistics folder does not seem to be displayed, and creating and saving the statistics.py file, available on python.org, makes no difference.

Googling for installing python libraries provides many examples of links to setup.py files and command line sequences, but I don’t see how they relate to the available statistics.py file.

I am clearly missing something (perhaps obviously!), But as a beginner, I cannot understand what it is. Any pointers?

+4
source share
1 answer

I had the same problem and instead:

import statistics

I wrote:

from lib import statistics

Good luck

+1
source

All Articles