【发布时间】:2014-03-17 12:54:58
【问题描述】:
我在 Windows 7 64 位上安装了 Scrapy。当我在 CMD 中输入scrapy startproject tutorial 时,我得到一个错误:
ImportError: No module named `cryptography.hazmat.bindings.openssl.binding`
为了解决这个问题,我想安装 pycrypto。当我运行pip install pycrypto 时,下一个错误是:_Unable to findvcvarsall.bat_,因为我已经安装了 Visual Studio 2010,为了解决这个问题,我安装了 mingw32 并设置了环境变量并禁用了我的防病毒软件并删除了-mno-cygwin来自cygwinccompiler.py:
if self.gcc_version < '4' or is_cygwingcc():
no_cygwin = ''
else:
no_cygwin = ' -mno-cygwin'
成为:
if self.gcc_version < '4' or is_cygwingcc():
no_cygwin = ''
else:
no_cygwin = ''
现在我得到了错误:
error command 'gcc' failed with exit status 1
(已安装python 2.7 64)
请指导我。
【问题讨论】:
-
该行之前应该会显示一条很长的错误消息:请复制它的最后一块,因为那里的某处包含您的 actual 错误(退出状态为 1 失败是只是一般信息)。最后 50 行可能会这样做。
-
愚蠢的问题:你的系统路径上有
gcc吗? -
build\temp.win-amd64-2.7\Release\src\winrand.o:winrand.c:(.text+0x47d): undefine d reference to `_imp__PyErr_Format' collect2: ld 返回 1 exit状态警告:未找到 GMP 或 MPIR 库;不构建 Crypto.PublicKey._fastmath。错误:命令“gcc”失败,退出状态为 1
标签: python python-2.7 gcc