所以我正在使用errbot并使用 python3.5 启动了一个 virtualenv。当我运行 errbot 命令时,出现此错误
from OpenSSL import crypto
File "/Users/me/workspace/chatbotv2/chatbot_venv3/lib/python3.5/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/Users/me/workspace/chatbotv2/chatbot_venv3/lib/python3.5/site-packages/OpenSSL/rand.py", line 12, in <module>
from OpenSSL._util import (
File "/Users/me/workspace/chatbotv2/chatbot_venv3/lib/python3.5/site-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/Users/me/workspace/chatbotv2/chatbot_venv3/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 250, in <module>
_verify_openssl_version(Binding.lib.SSLeay())
File "/Users/me/workspace/chatbotv2/chatbot_venv3/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 230, in _verify_openssl_version
"You are linking against OpenSSL 0.9.8, which is no longer "
这是关于 SO 的“问死”话题,所以很明显我很想尽快得到解决方案。我跟着这个答案。但是,当我运行时,brew link --force openssl
我得到了这个:
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
我尝试过:
export CPPFLAGS='-I/usr/local/opt/openssl/include'
export LDFLAGS='-L/usr/local/opt/openssl/lib'
在此之后,我迷路了,不知道该怎么办。当我尝试时:python -c "import ssl; print (ssl.OPENSSL_VERSION)"
我仍然得到OpenSSL 0.9.8zg 14 July 2015
。我在 OSX