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 <https://nocommandline.com/>, uses the datastore 
library and when we ran into issues, we found a work around here 
<https://github.com/googleapis/python-ndb/issues/568#issuecomment-724999321>
. 

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

*A GUI for Google App Engine*

On Wednesday, August 25, 2021 at 10:03:35 AM UTC-7 Joshua Smith wrote:

> 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
>
> On Aug 25, 2021, at 12:55 PM, NoCommandLine <[email protected]> 
> wrote:
>
> >>> 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*
>
> On Tuesday, August 24, 2021 at 12:46:49 PM UTC-7 Joshua Smith wrote:
>
>> 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
>>
>>
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/80de2521-0ead-4362-b64c-97b204c93d69n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/google-appengine/80de2521-0ead-4362-b64c-97b204c93d69n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/36298dab-501d-4332-bed1-2b9dbcb54e5bn%40googlegroups.com.

Reply via email to