微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法安装pyOpenSSL

我在Macbook Pro上双启动Windows 10分区:Mac:El Capitan(64位)Windows:Windows 10 64位,使用fat文件系统格式化

在Windows上,我安装了cygwin和Python 2.7。 通过cygwin,我安装了pip和gcc。

我也试着用http://www.lfd.uci.edu/~gohlke/pythonlibs/#cffi安装cffi,但是当我运行pip安装cffi-1.8.2-cp27-cp27m-win_amd64.whl ,出现错误: cffi....whl is not supported on this platform 。 然后我尝试了许多我不记得的东西,我想我甚至试着下载一个tar文件,然后现在,当我运行pip install cffi时,我被告知它已经安装了。

然后我运行pip install pyOpenSSL ,但是,我得到这个错误

如何在C中使用printf来强调文本

使用WinAPI从Probrowser控件捕获数据

从远程服务器读取证书哈希

Sikuli IDE终止没有错误信息

将在Windows中编写的Python代码工作在Linux?

gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.x86_64/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.x86_64/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/python2.7 -c build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.c -o build/temp.cygwin-2.6.0-x86_64-2.7/build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.o build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.c:433:30: Fatal error: openssl/opensslv.h: No such file or directory compilation terminated. error: command 'gcc' Failed with exit status 1 Command "/usr/bin/python -u -c "import setuptools,tokenize;__file__='/tmp/pip-build-9Emw8c/cryptography/setup.py';exec(compile(getattr(tokenize,'open',open)(__file__).read().replace('rn','n'),__file__,'exec'))" install --record /tmp/pip-wy64bj-record/install-record.txt --single-version-externally-managed --compile" Failed with error code 1 in /tmp/pip-build-9Emw8c/cryptography/

我也有这个错误,当我做pip install cryptography 。

我读了一个地方,我应该尝试: pip install --global-option build_ext --global-option --compiler=mingw64 pyopenssl ,我得到:

Skipping bdist_wheel for pyopenssl,due to binaries being disabled for it. Skipping bdist_wheel for cryptography,due to binaries being disabled for it. Installing collected packages: cryptography,pyopenssl Running setup.py install for cryptography ... error Complete output from command /usr/bin/python -u -c "import setuptools,tokenize;__file__='/tmp/pip-build-fIb1xc/cryptography/setup.py';exec(compile(getattr(tokenize,'exec'))" build_ext --compiler=mingw64 install --record /tmp/pip-7flSlN-record/install-record.txt --single-version-externally-managed --compile: running build_ext generating cffi module 'build/temp.cygwin-2.6.0-x86_64-2.7/_padding.c' creating build creating build/temp.cygwin-2.6.0-x86_64-2.7 generating cffi module 'build/temp.cygwin-2.6.0-x86_64-2.7/_constant_time.c' generating cffi module 'build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.c' error: don't kNow how to compile C/C++ code on platform 'posix' with 'mingw64' compiler ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools,'exec'))" build_ext --compiler=mingw64 install --record /tmp/pip-7flSlN-record/install-record.txt --single-version-externally-managed --compile" Failed with error code 1 in /tmp/pip-build-fIb1xc/cryptography/

有人可以请指出什么是错的?

更新:通过cygwin安装mingw64x86_64-openssl: OpenSSL encryption library for Win64 toolchain ,运行pip install pyopenssl ,得到:

running build_ext generating cffi module 'build/temp.cygwin-2.6.0-x86_64-2.7/_padding.c' creating build/temp.cygwin-2.6.0-x86_64-2.7 generating cffi module 'build/temp.cygwin-2.6.0-x86_64-2.7/_constant_time.c' generating cffi module 'build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.c' building '_openssl' extension creating build/temp.cygwin-2.6.0-x86_64-2.7/build creating build/temp.cygwin-2.6.0-x86_64-2.7/build/temp.cygwin-2.6.0-x86_64-2.7 /usr/bin/clang -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.x86_64/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.x86_64/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/python2.7 -c build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.c -o build/temp.cygwin-2.6.0-x86_64-2.7/build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.o build/temp.cygwin-2.6.0-x86_64-2.7/_openssl.c:433:10: Fatal error: 'openssl/opensslv.h' file not found #include <openssl/opensslv.h> ^ 1 error generated. error: command '/usr/bin/clang' Failed with exit status 1 ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools,tokenize;__file__='/tmp/pip-build-ZsWN3h/cryptography/setup.py';exec(compile(getattr(tokenize,'exec'))" install --record /tmp/pip-D2XH0P-record/install-record.txt --single-version-externally-managed --compile" Failed with error code 1 in /tmp/pip-build-ZsWN3h/cryptography/

在Windows中RotatingFileHandler“文件忙”

(为什么)Windows“Calc.exe”是否缺lessWndProc?

Windows API将窗口附加到桌面的左侧或右侧

WaitForMultipleObjects堆栈

防止Win32绘制经典的标题

我有一个类似的问题,并安装了libssl头文件,所以我可以编译python模块

sudo apt-get install libssl-dev

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐