Persisting spaCy import error: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+ #12750
-
I realize this is a recently common error, but none of the solutions I have found online helped me. I am trying to work with spaCy in Jupyter notebook and VScode on a Mac OS , but every time I try to import spacy, I get the following error:
I tried
This didn't work so I then tried to downgrade urllib3 using
Didn't work either. I tried using a virtual environment, also didn't work. I've been scouring the web trying to find a solution but nothing seems to work. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
This is not really a spaCy issue, but an issue with the Python installation. You could try to install an older version of
If that doesn't work, please confirm with
This will usually not work, because Homebrew installs openssl as a keg-only, meaning that the library is not visible, unless you explicitly link against it. Secondly, the SSL module links against libressl, which most likely has a different shared library version. Finally, the SSL module could have the library paths hardcoded (it does on my installation). |
Beta Was this translation helpful? Give feedback.
-
The error message you're encountering indicates that urllib3 version 2 requires OpenSSL 1.1.1 or newer, but your Python environment is using LibreSSL 2.8.3. This incompatibility is causing the warnings and likely the subsequent failure. You can resolve it by following below steps, I assume the device is MacOS Step 1: upgrade OpenSSL
Step 2: Reinstall python with correct SSL
x is a place holder here, you can use like below
` Step 3: upgrade urllib3
Step 4: verify the installation
|
Beta Was this translation helpful? Give feedback.
-
An another way to solve this problem: |
Beta Was this translation helpful? Give feedback.
This is not really a spaCy issue, but an issue with the Python installation. You could try to install an older version of
urllib3
, for instance, I have a virtual environment with a recent version of spaCy 3.5 andurllib3
1.26.15
, which works fine:If that doesn't work, please confirm with
pip show urllib3
that that version was indeed installed and what error you are getting. Another option would be to build or install a Python version that is built against OpenSSL 1.1.1 or newer.This will usually not work, because Homebrew installs openssl as a keg-only, meaning that the library is not visible, unless you explicitly link aga…