AWS OpenSSL Error

0

I'm pretty new to using the AWS server and I have a question about a error I'm having.

I use PuTTY to connect to my instance and when I run a file, this error always appear: ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2k-fips 26 Jan 2017. See: https://github.com/urllib3/urllib3/issues/2168

I searched in the internet how to update OpenSSL and it got updated from OpenSSL 1.0.2k-fips to OpenSSL 1.1.1k, but the error keeps appear even though I updated OpenSSL to 1.1.1k. If any of you guys know the way to solve this problem, please tell me.

Evoker
asked a year ago2026 views
1 Answer
1

Even though you've updated OpenSSL on your system, Python is still using the old version that it was originally compiled with

  • Reinstall Python
  • Create a new Python virtual environment
  • Check Python's SSL version: You can check the SSL version Python is using with this command: python -c "import ssl; print(ssl.OPENSSL_VERSION)".
  • Update urllib3: It's also worth noting that urllib3 recently made a change to only support OpenSSL 1.1.1 or later. If you can't update Python or OpenSSL, you might be able to resolve the issue by downgrading urllib3 to an older version that supports OpenSSL 1.0.2. This can be done using pip: pip install 'urllib3<2.0'.
profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions