如何使用Python从Jupyter Notebook将本地文件上传到Firebase存储 [英] How to upload local files to Firebase storage from Jupyter Notebook using Python

查看:542
本文介绍了如何使用Python从Jupyter Notebook将本地文件上传到Firebase存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我想导入google.cloud.storage可能是设置连接Firebase存储的API的第一步,所以我首先要做的就是像这样在Ubuntu上安装google-cloud:

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

它告诉我:

成功安装了google-cloud

Successfully installed google-cloud

然后我尝试从google.could导入Jupyter Notebook上的存储,例如:

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:没有名为"google"的模块

ModuleNotFoundError: No module named 'google'

所以我想知道什么是必要的步骤.

so I am wondering what are the necessary steps to do this.

推荐答案

尝试使用pip install --upgrade google-cloud-storage,如所述

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.

这篇关于如何使用Python从Jupyter Notebook将本地文件上传到Firebase存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆