致命错误C1083:无法打开包含文件:“openssl/opensslv.h”:没有此类文件或目录

2024-09-30 16:40:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在Windows7上安装paramiko。每次都会出现以下错误:

C:\Users\achayapa\AppData\Local\Programs\Common\Microsoft\Visual C++ for     Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG Ic:\python27\include -Ic:\python27\PC /Tcbuild\temp.win32-2.7\Release\_openssl.c /Fobuild\temp.win32-2.7\Release\build\temp.win32-2.7\Release\_openssl.obj
_openssl.c    build\temp.win32-2.7\Release\_openssl.c(433) : fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory

error: command 'C:\\Users\\achayapa\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

----------------------------------------
Command "c:\python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\achayapa\\appdata\\local\\temp\\pip-build-lhlycd\\cryptography\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\achayapa\appdata\local\temp\pip-t1xtw1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\achayapa\appdata\local\temp\pip-build-lhlycd\cryptography

尝试了以下链接中提到的解决方案:

Fatal error C1083: Cannot open include file: 'openssl/opensslv.h'

PyopenSSL and scrapy install fails in Python 27, Win 64 Bit

已在windows上安装以下程序:

微软Visual C++ 2012可重分发(x86) 微软Python 2.7微软公司VisualC++编译包


Tags: buildreleaseincludeerroropenexeusersappdata
1条回答
网友
1楼 · 发布于 2024-09-30 16:40:05

在Centos上,我遇到了同样的问题。这修复了它:sudo yum install openssl-devel-但是在windows上我不知道类似的命令。它找不到openssl库C头文件,因此需要修改python搜索路径,或者将文件移动到搜索路径中。在

相关问题 更多 >