Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用Python将本地文件从Jupyter笔记本上传到Firebase存储_Python_Api_Jupyter Notebook_Google Cloud Storage_Firebase Storage - Fatal编程技术网

如何使用Python将本地文件从Jupyter笔记本上传到Firebase存储

如何使用Python将本地文件从Jupyter笔记本上传到Firebase存储,python,api,jupyter-notebook,google-cloud-storage,firebase-storage,Python,Api,Jupyter Notebook,Google Cloud Storage,Firebase Storage,因为我想导入google.cloud.storage可能是设置连接firebase存储的API的第一步,所以我首先做的是在Ubuntu上安装google cloud,如下所示: $ pip install --upgrade google-cloud 它告诉我: 已成功安装google云 然后我尝试从google.com导入Jupyter笔记本上的存储,如: from google.cloud import storage 但它给了我一个错误信息,说: ModuleNotFoundError

因为我想导入google.cloud.storage可能是设置连接firebase存储的API的第一步,所以我首先做的是在Ubuntu上安装google cloud,如下所示:

$ pip install --upgrade google-cloud
它告诉我:

已成功安装google云

然后我尝试从google.com导入Jupyter笔记本上的存储,如:

from google.cloud import storage
但它给了我一个错误信息,说:

ModuleNotFoundError:没有名为“google”的模块


因此,我想知道执行此操作的必要步骤。

您必须执行两个步骤才能解决此问题

  • 检查谷歌软件包的来源
  • 尝试在virtualenv中安装google软件包

  • 尝试
    pip安装--升级谷歌云存储
    ,如前所述。无论如何,它应该包含在
    googlecloud
    库中,因此很可能存在与Jupyter笔记本相关的问题

    正如你所说,我觉得在Jupyter笔记本中,找不到某个安装的模块是一个常见的问题。