ModuleNotFoundError: No module named 'numpy'; but numpy installed
Solution 1
I was wrong, there was another Python version, 64-bit, in the Visual Studio folder. Uninstalled it and now problem fixed. Thanks everyone, especially @Praind.
Solution 2
The PyPi numpy package which is automatically downloaded by pip does not install correctly on Windows 7. I usually recommend that people install Python using the Anaconda distribution because it comes with numpy pre-installed.
Since you already have python installed, you can download the numpy wheel from Christoph Gohlke's page and install it that way. Be sure to use pip to uninstall the current non-working version first.
Have a look at this SO question, and specifically this answer for more details.
Admin
Updated on June 05, 2022Comments
-
Admin almost 2 years
NumPy installed via pip in Windows 7 64 bit, Python3.
When trying to run code in console (Far manager) I have an error:
Traceback (most recent call last): File "[path]\X.py", line 42, in <module> import numpy ModuleNotFoundError: No module named 'numpy'
Tried to install numpy but failed, because already installed
pip install numpy
Requirement already satisfied: numpy in c:\program files (x86)\python37-32\lib\site-packages (1.17.0)
This is exactly the right folder, all other libraries work in it correctly. Tried to uninstall numpy and then install again via
pip
but nothing changed.Checking Python version
python -- version
Python 3.7.3
Checking pip version pip -V
pip 19.2.1 from c:\program files (x86)\python37-32\lib\site-packages\pip (python 3.7)
There is no other Python version on my computer. I'm not sure but maybe numpy used to work before I installed
matplotlib
(via pip, of course).Thanks.