Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "ModuleNotFoundError: No module named 'numpy'"; but NumPy is installed

NumPy is installed via pip in Windows 7 64 bit, Python 3.

When trying to run code in the 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'

I tried to install NumPy, but I failed, because it was 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, and all other libraries work in it correctly. I 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).

like image 709
Nick Kolyshkin Avatar asked Mar 17 '26 19:03

Nick Kolyshkin


1 Answers

I was wrong. There was another Python version, 64-bit, in the Visual Studio folder.

I uninstalled it, and now the problem is fixed.

like image 129
Nick Kolyshkin Avatar answered Mar 19 '26 20:03

Nick Kolyshkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!