Closed hiranya911 closed 6 years ago
Hello, firebase_admin is a separate library, please direct the question here: firebase_admin
Please let us know if you encounter any more problems.
I am the maintainer of the firebase_admin
library. I'd like to know why the google-cloud-firestore
won't install when we have declared the dependency as follows in setup.py
:
install_requires = [
'google-auth>=1.3.0',
'google-cloud-firestore>=0.27.0',
'google-cloud-storage>=1.2.0',
'requests>=2.13.0',
'six>=1.6.1'
]
Please reopen.
This is very likely a bug in pip
.
I can reproduce this pretty readily. I believe it's because you depend on google-cloud-firestore
and google-cloud-storage
. It happens because they declare their dependency on google-api-core
slightly differently.
google-cloud-firestore
requires google-api-core[grpc]<2.0.0dev,>=0.1.1
.
google-cloud-storage
requires google-api-core<2.0.0dev,>=0.1.1
.
I think what's happening is that pip picks up the second one and ignores the extra declared in the first. See this line in the log:
Collecting google-api-core<2.0.0dev,>=0.1.1 (from google-cloud-storage>=1.2.0->firebase-admin)
Summoning @ncoghlan and @dstufft to see if they have thoughts on how best to either resolve this or report upstream.
I think this is the same as https://github.com/pypa/pip/issues/4957
@pradyunsg I'm happy to write a failing test case for pip that demonstrates this.
@hiranya911 My apologies.
@pradyunsg I'm happy to write a failing test case for pip that demonstrates this.
Thanks for the mention @jonparrott! Please do so and file an issue over at pradyunsg/zazo. :)
This is very likely a bug in pip.
It is basically pypa/pip#4957 which is a specific case of pypa/pip#988.
You'll have to work around this by actually pinning your dependencies in the top-level requirements that pip install
gets or using something like pip-tools (or pipenv
?) on top that adds proper dependency resolution.
Thanks @jonparrott and @chemelnucfin for looking into this. Should firebase-admin
take a direct dependency on google-api-core[grpc]<2.0.0dev,>=0.1.1
(as a temp workaround at least)?
Should firebase-admin take a direct dependency on google-api-core[grpc]<2.0.0dev,>=0.1.1 (as a temp workaround at least)?
Yes -- you'll have to keep this in sync with whatever google-cloud-storage and google-cloud-firestore does though.
@hiranya911, I agree with @pradyunsg: take a dependency on google-api-core[grpc]
. Drop your direct dependency on requests and google-auth.
Thanks, @pradyunsg for your insight! I'll try to write a failing test case sometime this week, time permitting. :)
Closing this for now, as we have no actionable items for this repository.
@hiranya911 I am a beginner in appegine and firestore, facing the same problem, which i describe in https://github.com/firebase/firebase-admin-python/issues/179
Can you elaborate how did you fix yours?
@constantinos07 Until the pip bug is fixed, or firebase-admin-python
adds the explicit pin needed to work around it, you can work around this by creating an explicit requirements.txt
which pins the needed versions, E.g.:
grpcio==1.13.0rc3
google-cloud-firestore==0.29.0
google-cloud-storage==1.10.0
We define it as >= 0.27.0
. So it ends up installing 0.29.0. This issue also seems to occur randomly. For instance I don't see it happening in our CI builds: https://travis-ci.org/firebase/firebase-admin-python/jobs/410999811
I encountered the following strange behavior on a Google Compute Engine node (in a Python 3 virtualenv sandbox).
I installed the
firebase-admin
module which has a dependency ongoogle-cloud-firestore
:As you can see at the end it has installed
google-cloud-firestore-0.29.0
package. But then I got the following error, trying to use it:Installing
google-cloud-firestore
separately resolved the issue:Any idea why
grpcio
did not install in the first attempt?