【发布时间】:2020-05-17 10:05:46
【问题描述】:
我正在使用本地运行时运行 Google Colab。我使用这个命令来启动 Jupyter:
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0
当我之前连接时,我可以在笔记本中使用此代码安装 Google Drive:
from google.colab import drive
drive.mount('/content/drive')
我能够在本地运行时连接到 Google 云端硬盘并访问文件。 但是,现在我收到此错误:
ModuleNotFoundError: No module named 'google.colab'
我看到其他人有这个问题,有些人建议使用 PyDrive。但我确定我在没有使用 PyDrive 的情况下连接到 Google Drive。
我怀疑当 Google Drive 能够连接时,我运行的第一个启动 Jupyter 的命令不同。 是否有一个特定的标志我必须添加到第一个命令中
【问题讨论】:
标签: python google-drive-api jupyter-notebook google-colaboratory