Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+ #1565

Closed
asukan007 opened this issue May 8, 2023 · 14 comments
Closed

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+ #1565

asukan007 opened this issue May 8, 2023 · 14 comments
Labels
api: bigquery Issues related to the googleapis/python-bigquery API.

Comments

@asukan007
Copy link

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: urllib3/urllib3#2168" when I import this library. it pointed me to this issue, can someone help me with what's the fix for this?

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label May 8, 2023
@jcurlier
Copy link

jcurlier commented May 8, 2023

+1

@bejoinka
Copy link

bejoinka commented May 9, 2023

what version of python are you running? which os? for example, the new apple silicon computers ship with a python ssl library that is compiled with libreSSL instead of openSSL, so you either need to build from source or install a version of python that is already compiled with the correct openSSL.

you'll see which version of openSSL is a dependency on homebrew, for example, with:

$ brew deps --tree python
python@3.11
├── mpdecimal
├── openssl@1.1
│   └── ca-certificates
├── sqlite
│   └── readline
└── xz

👍

@RameshChandraTR

This comment was marked as duplicate.

@martinamunoz
Copy link

If you are using Certbot you can set specific version of urllib like this with pip:
sudo pip install --upgrade urllib3==1.26.15
To avoid version problems. And with certbot can use this:
sudo /opt/certbot/bin/pip install --upgrade urllib3==1.26.15

@RameshChandraTR
Copy link

@martinamunoz I am not using certbot with sudo , can you please suggest the other alternate way or version of urllib3 which working fine with python 3.9

@asukan007
Copy link
Author

asukan007 commented May 14, 2023

I am using this liberaly in AWS Glue.
I had attempted to specify the openssl version, but it didn't work.
Instead, I specified the version of urllib3==1.26.15 and it worked!

@Akanksh29
Copy link

I am using this liberaly in AWS Glue. I had attempted to specify the openssl version, but it didn't work. Instead, I specified the version of urllib3==1.26.15 and it worked!

Where did you specify the urllib3 version in glue?

@huyenuet
Copy link

@Akanksh29 you can use this command to install a specific version of urllib3
pip install urllib3==1.26.6
I had the same issue and Version 1.26.6 worked for me.

@Its-suLav-D
Copy link

@huyenuet Which version of python were you using?

@asukan007
Copy link
Author

asukan007 commented May 21, 2023

@Akanksh29

Where did you specify the urllib3 version in glue?

If your requirements allow you to obtain wheel files from PyPI, you can install and use urllib3 v1.26.15 by specifying the following job parameters in glue.

job parameter in Glue

  • Key: --additional-python-modules
  • Value: google-cloud-bigquery==3.4.1 urllib3==1.26.15

@Onyekam
Copy link

Onyekam commented Jun 12, 2023

I am using this liberaly in AWS Glue. I had attempted to specify the openssl version, but it didn't work. Instead, I specified the version of urllib3==1.26.15 and it worked!

Hi, I would like to know how you were able to specify this - I don't have the "--additional-python-modules" key option in the Glue Job Parameter Options

@Onyekam
Copy link

Onyekam commented Jun 12, 2023

I am using this liberaly in AWS Glue. I had attempted to specify the openssl version, but it didn't work. Instead, I specified the version of urllib3==1.26.15 and it worked!

Nevermind, I've resolved it. In my case I was using a version of requests library that was too recent. Downgrading to version 2.29 fixed the issue.

@chalmerlowe
Copy link
Contributor

OP determined the error. The error was not with our library. Closing.

@theandrelima
Copy link

@Akanksh29 you can use this command to install a specific version of urllib3 pip install urllib3==1.26.6 I had the same issue and Version 1.26.6 worked for me.

this doesn't work for me on Amazon Linux 2 using python3.8 and python3.9 installed with pyenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API.
Projects
None yet
Development

No branches or pull requests