Leo
Leo

Reputation: 930

Unable to install a PyPi package in Cloud Composer

I tried installing boto3 on Composer but after some time I received the following error:

enter image description here

Any ideas what's going on? I typed boto3 in the package name without specifying the version.

Thanks

Upvotes: 3

Views: 5666

Answers (1)

Andrei Cusnir
Andrei Cusnir

Reputation: 2805

I have tried installing boto3 in Google Cloud Composer and it worked for me. It says under the PYPI PACKAGES that I have boto3>=1.9.86. So try specifying the version in the requirements file.

In Cloud Shell create a requirements.txt and add boto3>=1.9.86. This will install boto3 version 1.9.86 or newer, if there is available. During the procedure of creating the Google Cloud Composer Environment, you specified the Python version. Make sure that boto3 is compatible with that version.

Run the following command:

gcloud composer environments update ENVIRONMENT-NAME \
--update-pypi-packages-from-file requirements.txt \
--location LOCATION

And wait. It will take some time, but boto3 should install successfully.

More information can be found in Installing Python Dependencies documentation.

Upvotes: 4

Related Questions