Search code examples
google-cloud-platformgoogle-cloud-composergoogle-cloud-iam

How to add a Python package to Google Cloud Composer


I created a Composer environment and trying to add a Python package. When I try to add, after a while, it says "Failed to install PyPI packages". This documentation says, you should add some permissions to service account of Composer.

I added these roles to [PROJECT-ID]-compute@developer.gserviceaccount.com (Compute Engine default service account) but error still happening:

  • Composer Administrator
  • Environment and Storage Object Administrator
  • Editor
  • Storage Object Viewer
  • Cloud Composer API Service Agent

Which roles are necessary to add Python packages?


Solution

  • The problem was due to package version. I delimited the version value of the pymssql package like <3.0 and it didn't fail again.