NotOpenSSLWarning when using PyTorch

How do I fix the error NotOpenSSLWarning?

NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with LibreSSL 2.8.3

For someone, having the same issue, you can fix it by using an older version of urllib3 that is compatible.

Here’s the link of the original answer: StackOverFlow NotOpenSSLWarning


  1. Use virtualenv
  2. Install the older version of urllib
pip install urllib3==1.26.6
1 Like