4

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!

Hans
  • 41
  • 1
  • 1
  • 3

2 Answers2

16

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

pip3 install "urllib3 <=1.26.15"
Andres Dev
  • 161
  • 3
  • thank you. After looking more closely I saw that jupyter is still using python 3.9 - I'll have to do some research how to fix this. – Hans May 10 '23 at 06:05
1

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
Gianni Azizi
  • 222
  • 1
  • 9
  • thank you. After looking more closely I saw that jupyter is still using python 3.9 - I'll have to do some research how to fix this – Hans May 10 '23 at 06:05