pip install numpy (python 2.7) 失败,错误代码为 1 [英] pip install numpy (python 2.7) fails with errorcode 1

查看:32
本文介绍了pip install numpy (python 2.7) 失败,错误代码为 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 python 2.7.9 上通过 pip 安装 numpy...我检查了 pip list,它返回 pip (1.5.6), setuptools (12.0.4).我在 64 位 Windows 7 上运行,并且尝试了 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:Python27python.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('
', '
'), __file__, 'exec'))" install --record c:usersjonappdatalocal	emppip-qnynnf-recordinstall-record.txt --single-version-externally-managed 

--compile failed with error code 1 in c:usersjonappdatalocal	emppip_build_jon
umpyStoring 

debug log for failure in C:Usersjonpippip.log

当我检查 stackoverflow 中关于错误代码 1 的其他帖子时,他们的解决方案是确保您拥有最新版本的 setuptools.我从主网站安装了 Python 2.7.9,它带有 setuptoolspip 准备就绪.另外,我通过检查 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:Usersjonpippip.log.它很长,但接近尾声时说

So instead I looked up the debug log the console error told me to go to, at C:Usersjonpippip.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.

我不知道如何继续?

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

If it helps I can post the pip debug log.

推荐答案

此处 并使用 pip 安装:

Download the wheel (.whl file) file from here and install with pip:

  1. pip install wheel 安装对轮文件的支持.
  2. pip install numpy‑1.9.1+mkl‑cp27‑none‑win32.whl 安装轮子.
  1. pip install wheel to install support for wheel files.
  2. pip install numpy‑1.9.1+mkl‑cp27‑none‑win32.whl to install the wheel.

这篇关于pip install numpy (python 2.7) 失败,错误代码为 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆