首页 文章

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

提问于
浏览
1

我正在尝试在Windows 7上安装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上的程序下面:

Microsoft Visual C 2012 Redistributable(x86)用于Python 2.7 Microsoft Corporation的Microsoft Visual C编译器包

1 回答

  • 0

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

相关问题