pip install numpy (python 2.7) 失败,错误代码为 1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28142839/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
pip install numpy (python 2.7) fails with errorcode 1
提问by Jonathan Brouwer
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 在 python 2.7.9 上安装 numpy ......我检查了pip list
,它返回pip (1.5.6), setuptools (12.0.4)
. 我在 Windows 7 64 位上运行,并且我尝试了 Python 32 和 64 位版本。
pip install numpy
ends with:
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
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
.
当我在 stackoverflow 上查看有关错误代码 1 的其他帖子时,他们的解决方案是确保您拥有最新版本的setuptools
. 我从主网站安装了 Python 2.7.9,它同时提供setuptools
,pip
随时可用。另外,我通过检查确保我的系统安装了它们pip list
。
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
因此,我查看了控制台错误告诉我要去的调试日志,位于C:\Users\jon\pip\pip.log
. 它很长,但接近尾声它说
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
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.
我去了那个网址,下载了编译器,然后pip install numpy
再次运行。这次它没有抛出错误代码 1,但有一个不同的问题。它在屏幕上打印了一堵巨大的文字墙,这在我上次安装 numpy/matplotlib/etc 时从未发生过。它打印了几分钟的文本,然后冻结并停止。
I'm not sure how to proceed?
我不确定如何进行?
If it helps I can post the pip debug log.
如果有帮助,我可以发布 pip 调试日志。