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
已提問 1 年前檢視次數 2148 次
1 個回答
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
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南