I'm trying to install numpy My steps are as follows: Open cmd in numpy extracted folder(where I had extracted .tar.gz file) Then python setup.py install But I'm getting an error as follows: with many warnings like this and at the end error unable to find vcvarsall.bat (I regret to put a photo but I couldn't find any better way to copy text from cmd window) if possible suggest a compiled setup of numpy
Python Numpy not found or no module found 'numpy' error in vscode can be fixed by install the numpy module extension in vscode. We can also use pip or conda package managers to fix this issue. In case you have installed the module still same error is appearing that means have to activate the dedicated environment.
The Python "ModuleNotFoundError: No module named 'numpy'" occurs when we forget to install the numpy module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install numpy command.
Edit: Apparently this answer still gets attention occasionally. For anybody needing numpy, you almost certainly will be happier and more productive if you just go and get conda or miniconda which make installing all kinds of libraries like numpy very easy. In fact the first example on the page is conda install numpy
. An additional bonus: I find that conda works better as a package manager than virtualenv.
There is a discussion on this on stackoverflow but I can't find it. It's easy once you know how to do it, but not obvious. The key is to use the premade binaries instead of compiling it yourself + easy_install. Unless you want to compile it yourself and that's a whole different answer.
Either installing to virtualenv or just to your main python, here is what I do:
Download the latest numpy installer for windows and your version of python here.
Open that file in 7zip or whatever you have. Extract the installer that works for your CPU. Probably SSE3.
Put that file somewhere and get the full path to it including the name of the file.
From your command line with/without virtualenv activated, type:
easy_install "..."
with the quotes and with your full path pasted
in place of ...
(extra step) you may need to add C:\python27\Scripts\
to your system path (using your actual python path) if you get an error that easy_install is not found.
That should do it. If you want to compile it yourself (if the message you posted lost you, then you probably don't), then you'll need to read up on getting a c compiler installed and setup in windows for python.
You should be able to use the installers available here without any issues: https://sourceforge.net/projects/numpy/files/NumPy/1.8.0/
Make sure to pick the appropriate executable for your Python version.
If you are running Python 2.7 use the one linked here.
Note for future readers: If any updates to NumPy have been released, you might want to go here and choose the latest version available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With