pip install numpy(python 2.7)失败,错误代码为1
我正在通过python 2.7.9上的pip安装numpy …我检查了一下pip list
,然后返回pip (1.5.6), setuptools
(12.0.4)
。我在Windows 7 64位系统上运行,并且尝试了Python 32和64位版本。
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
。
因此,我改为查找调试日志,控制台错误告诉我转到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
我去了那个网址,下载了编译器,然后pip install
numpy
再次运行。这次没有抛出错误代码1,但是有另一个问题。它在屏幕上打印了一堵巨大的文字墙,这是我上次安装numpy / matplotlib /
etc时从未发生过的事情。它打印了几分钟,然后冻结并停止。
我不确定如何进行?
如果有帮助,我可以发布pip调试日志。