0

As the title says, I've just upgraded to Ubuntu 22.04 LTS and my previously working setup now says ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory when starting Jupyter, and equivalently throws Could not fetch URL https://pypi.org/simple/jupyter/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/jupyter/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping whenever trying to use pip.

Libssl is actually available at /usr/lib/x86_64-linux-gnu/libssl.so.1.1. I could change LD_LIBRARY_PATH but this seems to be a workaround.

Martino
  • 729
  • 6
  • 18
  • @furas the error is clear: libssl is not seen by python. This happens when trying to `import ssl`, in any context. – Martino May 05 '22 at 09:11
  • but full error may show other information which can be useful for us but you can think they are useless. – furas May 05 '22 at 10:54
  • `libssl1.0.0 → libssl.so.1.1` was earlier Ubuntu´s. **22.04** has `libssl3 → libssl.so.3` : https://packages.ubuntu.com/jammy/libssl3 → → https://packages.ubuntu.com/jammy/amd64/libssl3/filelist – Knud Larsen May 05 '22 at 11:21

1 Answers1

0

I resolved this problem by reinstalling the environment.

I use pipenv and pyenv. I removed the pipenv environment and the Python version using pyenv. Then reinstalled both.

  • Thanks, I thought this might work. I currently cannot try due to a bad internet connection (torch is heavy). But will try asap. – Martino May 13 '22 at 08:59
  • Also check if the SO python interpreter works as expected. If it is broken, you will need to reinstall the base python from scratch. Good luck! – Yuri Thomas Pinheiro Nunes May 13 '22 at 12:12