pip install numpy(python 2.7)失败,错误代码为1

Jon*_*wer 8 python numpy pip

我在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
Run Code Online (Sandbox Code Playgroud)

当我检查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
Run Code Online (Sandbox Code Playgroud)

我去了那个网址,下载了编译器,然后pip install numpy再次运行.它这次没有抛出错误代码1,但有一个不同的问题.它在屏幕上打印了一面巨大的文本墙,这在我最后一次安装numpy/matplotlib/etc时从未发生过.它打印文本几分钟,然后冻结并停止.

我不知道该怎么办?

如果有帮助我可以发布pip调试日志.

Mal*_*imi 32

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

  1. pip install wheel 安装对wheel文件的支持.
  2. pip install numpy?1.9.1+mkl?cp27?none?win32.whl 安装车轮.

  • 不确定 - 这完美地运作了:) (2认同)