简体   繁体   中英

Installing NumPy on Windows 8.1 with Python 2.7.x

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!

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM