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

问题描述 投票:0回答:1

每次在Python 2.7上安装PyopenSSLScrapy时,我的软件包安装(使用PIP和Easyinstall)都会失败。操作系统:Win 8.1 64位。

错误详情如下:

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

例外信息: Traceback(最近一次调用最后一次): 在主要文件“c:\ python27 \ lib \ site-packages \ pip \ basecommand.py”,第211行 status = self.run(options,args) 运行文件“c:\ python27 \ lib \ site-packages \ pip \ commands \ install.py”,第311行 根= options.root_path, 安装Kwargs中的文件“c:\ python27 \ lib \ site-packages \ pip \ req \ req_set.py”,第646行 安装文件“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(compile(getattr(tokenize,'open',open)(__ file __)。read()。replace('\ r \ n','\ n'),__ file __,'exec') )“安装--record c:\ users \ suraj \ appdata \ local \ temp \ pip-kppgmc-record \ install-record.txt --single-version-external-managed --compile”失败,错误代码1在c中:\用户\ SURAJ \应用程序数据\本地\ TEMP \ PIP-集结ajzmpr \密码。

到目前为止排除故障:

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

在Windows上安装的程序

Microsoft Visual C ++ 2012 Redistributable(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

提前致谢

python-2.7 scrapy pyopenssl
1个回答
2
投票

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

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

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

© www.soinside.com 2019 - 2024. All rights reserved.