【问题标题】:Error installing prettytable on ubuntu with pip使用 pip 在 ubuntu 上安装 prettytable 时出错
【发布时间】:2018-01-29 17:04:55
【问题描述】:

我刚刚安装了 pip,安装了几个包 np.我试过这个

pip install prettytable
Collecting prettytable
From cffi callback <function _verify_callback at 0x7f424837d6e0>:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Could not find a version that satisfies the requirement prettytable (from versions: )
No matching distribution found for prettytable

如何安装 Prettytable?

【问题讨论】:

    标签: python ubuntu pip prettytable


    【解决方案1】:

    错误来自PyOpenSSL。您的OpenSSL 太旧或太新。尝试升级或降级OpenSSLPyOpenSSL

    【讨论】:

    • 奇怪,这是来自一个全新的数字海洋服务器。我卸载并重新安装了 pyopenssl 并且它工作正常
    【解决方案2】:

    重新安装 pyopenssl 对我有用:

    pip uninstall pyopenssl
    pip install pyopenssl
    

    【讨论】: