Pip在安装软件包时会出现同样的错误

时间:2018-06-01 12:11:12

标签: python pip

当我使用pip安装软件包时,即使软件包不存在,它也会出现相同的错误。我无法理解错误,并没有给我一个错误代码。我正在安装的软件包称为pyinput。

$ pip install pyinput
Collecting pyinput
From cffi callback <function _verify_callback at 0x7f79def81758>:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 315, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pyinput/
From cffi callback <function _verify_callback at 0x7f79d92bd848>:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 315, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pyinput/
From cffi callback <function _verify_callback at 0x7f79d92bd938>:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 315, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)': /simple/pyinput/
From cffi callback <function _verify_callback at 0x7f79d92bd500>:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 315, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
^COperation cancelled by user
From cffi callback <function _verify_callback at 0x7f79d92bde60>:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 315, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: 'module' object has no attribute 'X509_up_ref'
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) - skipping

如果有人能帮助我,我会很感激。 谢谢。

2 个答案:

答案 0 :(得分:0)

试试这个,请告诉我这是否解决了您的问题,

pip3 install -trusted-host=pypi.org -trusted-host=python.pypi.org -trusted-host=files.pythonhosted.org pyinput

答案 1 :(得分:0)

尝试

pip uninstall pyOpenSSL cryptography

sudo pip install pyOpenSSL cryptography