繁体   English   中英

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) 我在64位Windows 7上运行,我已经尝试过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,它随附了setuptoolspip 另外,我通过检查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调试日志。

这里下载wheel(.whl文件)文件并使用pip安装:

  1. pip install wheel来安装对wheel文件的支持。
  2. pip install numpy‑1.9.1+mkl‑cp27‑none‑win32.whl来安装方向盘。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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