I'm trying to run a script that requires SciPy to be able to use the stats module. When I try to run this script I got the following:
$python ./myScript.py 100 someFile.json
Traceback (most recent call last):
File "./myScript.py", line 12, in <module>
from sampler import *
File "C:\myProject\python\lib\anotherScript.py", line 28, in <module>
from stats import Histogram
ModuleNotFoundError: No module named 'stats'
I'm really a newbie in Python stuff so I'm just trying to run this sample code I got from a project I cloned, so it should work... I'm in a Windows 10 environment, I have this Python version:
$ python --version
Python 3.8.4
I read somewhere I needed to install Numpy first so I did it using this pip command here and then I installed SciPy following their official instructions and both installed successfully.
I tried the answers provided in other answers at Stack Overflow (like force reinstall Numpy and SciPy) unsuccessfully. I also did the following test:
$ python
Python 3.8.4 (tags/v3.8.4:dfa645a, Jul 13 2020, 16:46:45) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.version.full_version
'1.5.1'
>>>
>>> from scipy import stats
>>> from stats import Histogram
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'stats'
>>>
>>> from stats import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'stats'
>>>
What can I do next?