lithops-cloud / lithops

A multi-cloud framework for big data analytics and embarrassingly parallel jobs, that provides an universal API for building parallel applications in the cloud ☁️🚀
http://lithops.cloud
Apache License 2.0
317 stars 105 forks source link

Python 3.7 Lambda: urllib3 v2.0 only supports OpenSSL 1.1.1+ #1104

Closed ZikBurns closed 1 year ago

ZikBurns commented 1 year ago

When I run lithops test or any other invoke, I get:

Exception: An error occurred: {'errorMessage': "Unable to import module 'entry_point': 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", 'errorType': 'Runtime.ImportModuleError', 'stackTrace': []} It creates lithops_v2-9-0_l3bm__lithops-default-runtime-v37_256MB and lithops_v2-9-0_l3bm_lithops-default-runtime-v37_layer

Lithops version: 2.9.0 Python version: 3.7 Configuration:

Temporary workaround:

  1. Create a requirements.txt with the following packages:
    lithops
    urllib3==1.26.15
  2. Create your own dependencies zip:
    pip install -r requirements.txt -t ./python/
    zip -r9 site-packages.zip python
  3. Upload it to S3 and update the layer in the generic function
aitorarjona commented 1 year ago

Can confirm this is still an issue also for python39

JosepSampe commented 1 year ago

According to this, botocore is not yet compatible with urllib3 2.0, so #1122 should solve the issue.

@ZikBurns Can you try with master branch?

pip install -U git+https://github.com/lithops-cloud/lithops.git@master
CelioXavier commented 1 year ago

I managed to resolve this error by including the following import in requirements.txt:

requests==2.18.4 google-auth==1.1.0

With that, my lambda started executing again.

Hugs!