我在Windows 7 64bit上安装了Scrapy。当我在CMD中输入scrapy startproject tutorial
时,出现错误:
ImportError: No module named `cryptography.hazmat.bindings.openssl.binding`
要解决这个问题,我想安装pycrypto。当我运行pip install pycrypto
时,下一个错误是:_Unable to find
vcvarsall.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)
请指导我。
答案 0 :(得分:0)
简单的方法就是从http://www.voidspace.org.uk/python/modules.shtml#pycrypto
安装二进制版本然后你可以在闲暇时再次尝试构建PyCrypto C扩展:
vcvarsall.bat
的CMD快捷方式。使用该快捷方式启动cmd.exe
并从那里运行pip install
。