Home > Mobile >  How can I get requirements.txt to work for Google App Engine?
How can I get requirements.txt to work for Google App Engine?

Time:10-14

It appears the current versions of google-cloud-logging and google-cloud-storage are incompatible. How on earth does Google think it's okay to have a "platform" where you can't use the latest versions of things together?

If my requirements.txt has:

google-cloud-storage
google-cloud-logging

I get:

WARNING: Found incompatible dependencies: "google-cloud-datastore 1.15.5 has requirement protobuf<4.0.0dev, but you have protobuf 4.21.7

If I try to work around that by adding:

protobuf==3.20.1

Then I get:

WARNING: Found incompatible dependencies: "google-cloud-logging 3.2.5 has requirement protobuf!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 3.20.1.\ngoogle-cloud-appengine-logging 1.1.6 has requirement protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 3.20.1.\ngoogle-api-core 2.10.2 has requirement protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 3.20.1.

Does anyone here know an incantation that actually allows google-cloud-storage and google-cloud-logging to be used at the same time?

Also, if anyone from the GAE team is reading this, will you please get your act together on this, and make the "latest" versions of your SDKs work together? This protobuf issue has been around for a really long time.

CodePudding user response:

Because you are integrating Cloud Datastore, which has a dependency requirement that the protobuf package version be lower than 4.0 use:

protobuf<4
  • Related