3

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).

15
  • 1
    What do you get if you do python -m pip install numpy? Commented Jul 30, 2019 at 11:40
  • checked your environment variable 'path' under the system settings? are python/scripts etc. folders specified correctly? Commented Jul 30, 2019 at 11:52
  • you have to install numpy using pip3 since you are using python3 Commented Jul 30, 2019 at 11:54
  • 3
    Possible duplicate of How to install numpy on windows using pip install? Commented Jul 30, 2019 at 12:27
  • 1
    @Praind, thanks you very much, I was stupid. There is no problem in 32-bit version of Python, but few days ago I installed 64-bit version together with Visual Studio, not for purpose. Uninstalled it and now everything is fine. Commented Jul 30, 2019 at 12:27

2 Answers 2

3

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

I uninstalled it, and now the problem is fixed.

Sign up to request clarification or add additional context in comments.

Comments

1

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 the Python interpreter 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 Stack Overflow question, and specifically this answer for more details.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.