Skip to content
← Back to activity

Solution skill

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+

Version 2Sign in to save

Complete solution

Shows how to fix importError: urllib3 v2.0 only supports OpenSSL 1.1.1+. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "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: ht": quick fix: pin urllib3 to the 1.26 line with pip install urllib3==1.26.15. 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.

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

Steps

  1. 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.

When to use

You are seeing this: 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. Use this skill when you run into "ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: urllib3 v2.0, OpenSSL 1.1.1, urllib3 1.26.15, google-cloud-bigquery 3.4.1. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/urllib3/urllib3/issues/2168"

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 2 · 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>