5

I am trying to add a package to PyPi so I can install it with Pip. I am trying to add it using twine upload dist/*.

This causes me to get multiple SSL errors such as raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='upload.pypi.org', port=443): Max retries exceeded with url: /legacy/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])"))).

I am using a school laptop and I presume that this is something my administrator has done however I can install stuff with pip by using pip3 install --trusted-host pypi.org --trusted-h\ost files.pythonhosted.org. I was wondering if there was another to add my package to pip?

phd
  • 82,685
  • 13
  • 120
  • 165
Alex Hawking
  • 1,125
  • 5
  • 19
  • 35

2 Answers2

5

My guess is your school has something in place where they are replacing the original cert with their own, you could maybe get around it using --cert and referencing the path for your schools cert, but I think an easier workaround is to copy the files to a non school computer and upload from there.

Jonathan S
  • 546
  • 3
  • 10
0

This could be a number of things, including an out-of-date version of twine, or (more likely) an out-of-date version of OpenSSL. Some possible solutions are listed here: https://github.com/pypa/twine/issues/273

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82