问题
Since I guess importing google.cloud.storage might be a very first step to set API connecting the firebase storage, what I did first is to install google-cloud on Ubuntu like this:
$ pip install --upgrade google-cloud
and it told me:
Successfully installed google-cloud
Then I tried to import storage from google.could on Jupyter Notebook like:
from google.cloud import storage
but it gave me an error message, says:
ModuleNotFoundError: No module named 'google'
so I am wondering what are the necessary steps to do this.
回答1:
Try pip install --upgrade google-cloud-storage as mentioned here. It should be included in google-cloud library anyway, so most likely there is some kind of issue related to the Jupyter Notebook.
回答2:
You have to do two steps which may resolve this issue.
- Check from where google package comes
- Try to install google package in virtualenv
来源:https://stackoverflow.com/questions/51739565/how-to-upload-local-files-to-firebase-storage-from-jupyter-notebook-using-python