pip install numpy(python 2.7)失败,错误代码为1 [英] pip install numpy (python 2.7) fails with errorcode 1
问题描述
我正在python 2.7.9上通过pip安装numpy ...我检查了pip list
,它返回了pip (1.5.6), setuptools (12.0.4)
.我在Windows 7 64位系统上运行,并且尝试了Python 32和64位版本.
I'm installing numpy through pip on python 2.7.9... I checked pip list
, and it returns pip (1.5.6), setuptools (12.0.4)
. I'm running on Windows 7 64-bit, and I've tried both Python 32 and 64-bit versions.
pip install numpy
结尾于:
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\jon\\appdata\\local\\temp\\pip_build_jon\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\jon\appdata\local\temp\pip-qnynnf-record\install-record.txt --single-version-externally-managed
--compile failed with error code 1 in c:\users\jon\appdata\local\temp\pip_build_jon\numpyStoring
debug log for failure in C:\Users\jon\pip\pip.log
当我检查stackoverflow上有关错误代码1的其他帖子时,他们的解决方案是确保您具有setuptools
的最新版本.我从主网站安装了Python 2.7.9,它同时提供了setuptools
和pip
.另外,我通过检查pip list
确保了我的系统已安装它们.
When I checked stackoverflow for other posts about errorcode 1, their solutions were to make sure you have an up-to-date version of setuptools
. I installed Python 2.7.9 from the main website, and it comes with both setuptools
and pip
ready to go. Plus I made sure my system had them installed by checking pip list
.
因此,相反,我在C:\Users\jon\pip\pip.log
上查找了控制台错误告诉我要去的调试日志.它很长,但是在结尾处显示
So instead I looked up the debug log the console error told me to go to, at C:\Users\jon\pip\pip.log
. It's quite lengthy, but near the end it says
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
我转到该URL,下载了编译器,然后再次运行pip install numpy
.这次它没有抛出错误代码1,但是有一个不同的问题.它在屏幕上打印了一堵巨大的文字墙,这是我上次安装numpy/matplotlib/etc时从未发生过的事情.它打印了几分钟,然后冻结并停止.
I went to that url, downloaded the compiler, and ran pip install numpy
again. It didn't throw errorcode 1 this time, but had a different issue. It printed a huge wall of text to the screen, which never happened the last time I installed numpy/matplotlib/etc. It printed the text for a few minutes, then froze and stopped.
我不确定该如何进行?
I'm not sure how to proceed?
如果有帮助,我可以发布pip调试日志.
If it helps I can post the pip debug log.
推荐答案
Download the wheel (.whl file) file from here and install with pip:
-
pip install wheel
以安装对wheel文件的支持. -
pip install numpy‑1.9.1+mkl‑cp27‑none‑win32.whl
安装轮子.
pip install wheel
to install support for wheel files.pip install numpy‑1.9.1+mkl‑cp27‑none‑win32.whl
to install the wheel.
这篇关于pip install numpy(python 2.7)失败,错误代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!