所以我正在使用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 "


因此,这是一个“被问到死”的话题,所以很显然我很想尽快找到解决方案。我遵循了这个answer。但是,当我运行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上

最佳答案

升级您的点数。 pip 8.1+将下载已预编译密码的二进制密码。如果您想自己编译,也可以在installation页上的文档中找到正确的自制软件环境变量。

10-08 02:07