0

When I install packages with pip it always gives the same error, even if the package doesn't exist. I cant make any sense of the error and doesnt give me a error code. The package I am installing is called 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

If anyone could help me with this i would appreciate it. Thank you.

Nyle Cohen
  • 15
  • 3
  • duplicate of https://stackoverflow.com/questions/43267157/python-attributeerror-module-object-has-no-attribute-ssl-st-init ? – Harold Jun 01 '18 at 12:23
  • Possible duplicate of [Error installing prettytable on ubuntu with pip](https://stackoverflow.com/questions/48506436/error-installing-prettytable-on-ubuntu-with-pip) – phd Jun 01 '18 at 22:05

2 Answers2

1

Try this, let me know if this solves your issue,

pip3 install -trusted-host=pypi.org -trusted-host=python.pypi.org -trusted-host=files.pythonhosted.org pyinput
BcK
  • 2,548
  • 1
  • 13
  • 27
  • No. I get a different error that is too long to put in a comment. I would move it to chat but I dont have enough rep to do that. – Nyle Cohen Jun 01 '18 at 12:46
0

Try

pip uninstall pyOpenSSL cryptography

or

sudo pip install pyOpenSSL cryptography
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
ashwin
  • 332
  • 2
  • 16