首页 文章

Python 27,Win 64 Bit中的PyopenSSL和scrapy安装失败

提问于
浏览
1

每次在 Python 2.7. OS: Win 8.1 64 Bit 上安装 PyopenSSLScrapy 时,我的软件包安装(使用PIP和Easyinstall)都会失败 .

错误详情如下:

C:\ Users \ <用户名> \ AppData \ Local \ Programs \ Common \ Microsoft \ Visual C for Python \ 9.0 \ VC \ Bin \ amd64 \ cl.exe / c / nologo / Ox / MD / W3 / GS- / DNDEBUG -Ic:\ python27 \ include -Ic:\ python27 \ PC /Tcbuild\temp.win-amd64-2.7\Release_openssl.c /Fobuild\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7 \ Release_openssl.obj _openssl.c
build \ temp.win-amd64-2.7 \ Release_openssl.c(429):致命错误C1083:无法打开包含文件:'openssl/opensslv.h':没有此类文件或目录错误:命令'C:\Users\Suraj\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe'失败,退出状态为2

Exception information:
回溯(最近的呼叫最后):
文件"c:\python27\lib\site-packages\pip\basecommand.py",第211行,在main中
status = self.run(options,args)
文件"c:\python27\lib\site-packages\pip\commands\install.py",第311行,在运行中
根= options.root_path,
文件"c:\python27\lib\site-packages\pip\req\req_set.py",第646行,在安装Kwargs中
文件"c:\python27\lib\site-packages\pip\req\req_install.py",第852行,正在安装中
show_stdout =假
在call_subprocess中的文件"c:\python27\lib\site-packages\pip\utils_init_.py",第733行
%(command_desc,proc.returncode,cwd))
InstallationError:命令"c:\python27\python.exe -c " import setuptools,tokenize; __ file __ = 'c:\users\suraj\appdata\local\temp\pip-build-ajzmpr\cryptography\setup.py'; exec(编译(getattr(tokenize,'open',open)(__ file ).read() . replace('\r\n','\n'), file __,'exec'))" install --record c:\users\suraj\appdata\local\temp\pip-kppgmc-record\install-record.txt --single-version-externally-managed --compile"失败,错误代码1在c:\ users \ suraj \ appdata \ local \ temp \ pip-build-ajzmpr \ cryptography中 .

Troubleshooting done so far:

1.错误与Easyinstall和Pip相同
2.将日志更改为详细级别 .
3.检查多个Stackoverflow链接,仍然没有运气:
http://stackoverflow.com/questions/37951303/fatal-error-c1083-cannot-open-include-file-openssl-opensslv-h

Installed programs on Windows

Microsoft Visual C 2012可再发行组件(x86) - 11.0.61030 Microsoft Corporation 07/10/2014 17.3 MB 11.0.61030.0

适用于Python的Microsoft Visual C编译器包2.7 Microsoft Corporation 26/07/2016 380 MB 9.0.1.30729

提前致谢

1 回答

  • 2

    我遇到了同样的问题 . 这是我做的:

    首先在您的计算机上安装加密,使用以下链接:https://cryptography.io/en/latest/installation/#on-windows

    如果您的计算机上没有安装openSSL,则上面的页面将包含该链接 . 添加链接中提到的环境变量并尝试再次安装 .

相关问题