Reputation: 1821
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
Upvotes: 6
Views: 39620
Reputation: 11
For Python 3 users
I am using Python 3.8.5 on Windows 10, I was able to install Numpy 1.20.2 (most recent as of Apr 1 2021) without any issues along with Pandas 1.2.3, Six 1.15.0, python-dateutil 2.8.1 using pip 21.0.1
So, upgrade to latest pip and try again ^_^
P.S. Not an April Fool's Joke
Upvotes: 1
Reputation: 7545
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.
Upvotes: 4
Reputation: 51
I had this same issue trying to install numpy 1.9.2 for python 3.4 (most recent version at 02/04/2015)
I manged to fix this by downloading the .exe from http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python3.4.exe/download
and now I can use Numpy in pycharm
Hope this helps!
Upvotes: 1
Reputation: 15571
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.
Upvotes: 5
Reputation: 82600
This is because numpy needs to compile binaries. You can get the binaries from here.
Upvotes: 1