Reputation: 876
I'm on their github page: https://github.com/GoogleCloudPlatform/google-cloud-python
Their first command is pip install --upgrade google-cloud
this gives me:
Collecting google-cloud
Could not find a version that satisfies the requirement google-cloud (from versions: )
No matching distribution found for google-cloud
I downloaded their SDK and which installed their google cloud SDK and I did gcloud init, but I can't seem to have their python library imported into mine. Starting python and typing:
from google.cloud import datastore
gives me an error that it doesn't exist as a module... This is all from their github so I'm not sure what I'm doing wrong
Upvotes: 2
Views: 6056
Reputation: 5684
First, make sure you have installed gcloud
on your system then run the commands like this:
First: gcloud components update
in your terminal.
then: pip install google-cloud
And for the import error:
I had a similar problem. Adding "--ignore-installed" to my pip command made it work for me.
This might be a bug in pip - see this page for more details: https://github.com/pypa/pip/issues/2751
Upvotes: 0
Reputation: 3905
The issue is that the team is trying to transition from gcloud
to google-cloud
which is still somewhere incomplete.
All you need to do is install gcloud
using pip
and you should be fine.
Pro Tip: python -m pip install --upgrade gcloud
using this command will install it for your python version.
Upvotes: 3