Hans
Hans

Reputation: 61

Trying to run jupyter-notebook on MacOs 13.3.1 (a) with python 3.9: ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+

I just installed jupyter notebook via "pip3 install jupyterlab" I added the install directory to my path (/Users//Library/Python/3.9/bin)

python version: Python 3.9.6 (default, Mar 10 2023, 20:16:38) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin

pip version: 23.1.2

jupyter --version Selected Jupyter core packages... IPython : 8.13.2 ipykernel : 6.22.0 ipywidgets : not installed jupyter_client : 8.2.0 jupyter_core : 5.3.0 jupyter_server : 2.5.0 jupyterlab : not installed nbclient : 0.7.4 nbconvert : 7.3.1 nbformat : 5.8.0 notebook : 6.5.4 qtconsole : not installed traitlets : 5.9.0

I can start jupyter-notebook, but when I try to run an import command (like "import openai") I get the following error:

"ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168"

I don't really understand this. "which openssl" points me to /usr/bin/openssl and /usr/bin/openssl version returns LibreSSL 3.3.6

I also did some googeling and looked up https://github.com/urllib3/urllib3/issues/2168, but I don't find a solution to my problem.

Would be thankful if someone could me point in the right direction.. Thanks guys!

Upvotes: 6

Views: 23008

Answers (2)

Gianni Azizi
Gianni Azizi

Reputation: 250

I had the same issue, but it works now since i upgraded to Python 3.11.

You can try with pipenv :

pipenv install --python 3.11

Upvotes: 1

Andres Dev
Andres Dev

Reputation: 221

I had a similar issue and this worked for me. I installed the desired version using

pip3 install "urllib3 <=1.26.15"

Upvotes: 22

Related Questions