kartikey_kant kartikey_kant - 1 year ago 147
Python Question

Error installing numpy

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:
enter image description here
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

Answer Source

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:

  1. Download the latest numpy installer for windows and your version of python here.

  2. Open that file in 7zip or whatever you have. Extract the installer that works for your CPU. Probably SSE3.

  3. Put that file somewhere and get the full path to it including the name of the file.

  4. From your command line with/without virtualenv activated, type: easy_install "..." with the quotes and with your full path pasted in place of ...

  5. (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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download