Weird Error Message

43 views
Skip to first unread message

Joshua Smith

unread,
Aug 24, 2021, 3:46:49 PM8/24/21
to google-a...@googlegroups.com
I'm up to date with gcloud, and I'm getting this warning when I deploy:

WARNING: Found incompatible dependencies: "
google-cloud-datastore 1.15.3 has requirement google-api-core[grpc]<2.0.0dev,>=1.14.0,
 but you have google-api-core 2.0.0.\n
google-cloud-datastore 1.15.3 has requirement google-cloud-core<2.0dev,>=1.4.0,
 but you have google-cloud-core 2.0.0."

I don't have any explicit version numbers in my requirements.txt file. What does this error mean, and how do I fix it?


-Joshua


NoCommandLine

unread,
Aug 25, 2021, 12:55:56 PM8/25/21
to Google App Engine
>>> I don't have any explicit version numbers in my requirements.txt file.  <<<

When you don't have explicit version numbers, the system will install the most recent. Sometimes the most recent version of one package causes issues in another package and you are thus advised to stick with a lower version or range of lower versions (i.e. a version is pinned). This is the warning message you are getting here

In your example, your system has automatically installed google-api-core 2.0.0 but your version of  google-cloud-datastore needs something lower than 2.0.0 but a minimum of 1.14.0

To fix it, you should set explicit version numbers for the packages mentioned, using the range or version mentioned in the error message you received. You'll have to pick something that works for you. For example, you can have google-api-core 1.14.0 in your requirements.txt file but this assumes that there is nothing in your code that needs a feature that is in a higher release

   ..... NoCommandLine ......
 https://nocommandline.com

A GUI for Google App Engine

Joshua Smith

unread,
Aug 25, 2021, 1:03:35 PM8/25/21
to google-a...@googlegroups.com
That makes sense. But in this case, I don't have google-api-core or google-cloud-core in my requirements.txt at all, so I guess it's being dragged in by something else?

This is what I have:

Flask==1.1.1
google-cloud-ndb
google-cloud-storage
google-cloud-logging
google-api-python-client
google-cloud-tasks
googleapis_common_protos
oauth2client
httplib2
sendgrid
pillow
pytz

So does this mean I need to downgrade some of those standard google- packages? And if so, how do I know what version to downgrade to?

Also, is this documented anywhere? I'd think if I'm using a bunch of google packages, google would be careful to make sure they latest versions of them all work together. And if they don't, there would be a document saying exactly what versions they want apps to use.

-Joshua

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/80de2521-0ead-4362-b64c-97b204c93d69n%40googlegroups.com.

NoCommandLine

unread,
Aug 25, 2021, 2:29:13 PM8/25/21
to Google App Engine
Since you don't directly list google-api-core or google-cloud-core in your requirements.txt file, you are right in saying that it is a dependency of one of the packages you have in your requirements.txt file and was installed as that package was being installed. I also agree with you that the package should install the correct version of whatever dependencies it needs.

However, my experience is that these issues (version restrictions) are usually not known upfront, they are discovered as users use the package and raise an issue, and the version pinning is a 'work around' till they fix the issue. This means you will usually find this documented under the 'issues' section on the GitHub page for the library. For example, one of the templates in our App, uses the datastore library and when we ran into issues, we found a work around here

   ..... NoCommandLine ......
 https://nocommandline.com

A GUI for Google App Engine

Reply all
Reply to author
Forward
0 new messages