Apache Beam Jupyter Notebook: ImportError: cannot import name 'storage' from 'google.cloud' (unknown location)

Apache Beam Jupyter Notebook: ImportError: cannot import name 'storage' from 'google.cloud' (unknown location)

我正在尝试将存储导入到 Apache Beam 内核上的 jupyter notebook 中,但它显示位置未知。如果我尝试导入其他 google-cloud 库,例如 bigquery 或 datastore 它可以工作,存储是失败的。

我遇到了同样的问题,下面是我的解决方法。

  1. 使用pip install --upgrade google-cloud-storage
  2. 重启内核以使用更新包

我按照上面的步骤操作,现在可以导入了。