1
votes

I'm very new to Python and programming world and has been going along with tutorials from newcoder.io This Here! I have been doing as per the instructions but when I try to install NumPy I get an error.

" error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27


Command "C:\Users\HP.virtualenvs\DataVizProj\Scripts\python.exe -c "import setuptools, tokenize;file='c:\users \appdata\local\temp\pip-build-lsj5sj\numpy\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).re .replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\hp\appdata\local\temp\pip-6jei4k-record\instal cord.txt --single-version-externally-managed --compile --install-headers C:\Users\HP.virtualenvs\DataVizProj\includ te\python2.7" failed with error code 1 in c:\users\hp\appdata\local\temp\pip-build-lsj5sj\numpy

"

But that's not enough, I tried to install VCForPython27.msi from the given link. But still, gets the same error.

Please Help!

2

2 Answers

3
votes

I recommend installing the Anaconda distribution of Python. It contains more packages than you can dream of, including numpy of course: http://continuum.io/downloads

The installation is as straightforward as installing the usual Python, no matter what OS you are on.

2
votes

A good solution is to download the wheel file which match your Python version here:unofficial python binaries

And then go to the folder where the .whl file is present using the command prompt and unpack the wheel file xxxxx.whl with:

>python -m pip install xxxxx.whl

This will install the library in the Lib\site-packages folder, you can check it afterwards.