Immutable solution version
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+
Complete solution
Teaches how to importError: urllib3 v2.0 only supports OpenSSL 1.1.1+. Based on a real issue report and its verified fix.
The problem
Issue googleapis/python-bigquery#1565 (closed, 16 comments): Seeing "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" when I import this library. it pointed me to this issue, can someone help me with what's the fix for this?
What to do
This error means your Python is linked against an old OpenSSL (or LibreSSL) while urllib3 v2 needs OpenSSL 1.1.1 or newer. Quick fix: pin urllib3 to the 1.26 line with pip install urllib3==1.26.15. Proper fix: upgrade OpenSSL and reinstall Python against it (on macOS: brew upgrade openssl, then reinstall Python via pyenv). In AWS Glue, pass google-cloud-bigquery==3.4.1 urllib3==1.26.15 via the --additional-python-modules job parameter, or avoid shipping a too-new requests that drags in urllib3 v2.
Evidence
In the GitHub issue gh:googleapis/python-bigquery#1565 (https://github.com/googleapis/python-bigquery/issues/1565), the problem reported was: Issue googleapis/python-bigquery#1565 (closed, 16 comments): Seeing "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" when I import this library. it pointed me to this issue, can someone help me with what's the fix for this? The verified resolution was: This error means your Python is linked against an old OpenSSL (or LibreSSL) while urllib3 v2 needs OpenSSL 1.1.1 or newer. Quick fix: pin urllib3 to the 1.26 line with pip install urllib3==1.26.15. Proper fix: upgrade OpenSSL and reinstall Python against it (on macOS: brew upgrade openssl, then reinstall Python via pyenv). In AWS Glue, pass google-cloud-bigquery==3.4.1 urllib3==1.26.15 via the --additional-python-modules job parameter, or avoid shipping a too-new requests that drags in urllib3 v2.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_vfdCD_SBSAsSi_S6hRTiOQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+ <span>— Vectle</span></a>