ModuleNotFoundError: No module named 'google.cloud' jupyter notbook python 3.8.0

ModuleNotFoundError: No module named 'google.cloud' jupyter notbook python 3.8.0

我正在尝试在 Jupyter 笔记本中使用云存储 python 库。

我正在 运行 使用 python 3.8.0 创建一个虚拟环境(不知道是否可以关联,但我在 mac 上使用 M1 芯片但是运行在 Rosetta 模式下连接我的终端。

我 运行 pip install google-cloud-storage 有效,但是当我启动 Jupyter notebook 和 运行 from google.cloud import storage 我得到 ModuleNotFoundError: No module named 'google.cloud'.

这是我的第一个问题,如果问题不清楚或者缺少相关信息,请指教。

在 jupyter notebook 中尝试这个命令

!pip install google-cloud-storage

然后

from google.cloud import storage