【发布时间】:2022-02-22 14:39:41
【问题描述】:
我正在尝试从 https://drive.google.com/drive/folders/my_folder_name 挂载一个目录,以便在 google colab notebook 中使用。
安装文件夹的说明显示了以 /content/drive 开头的目录的示例:
from google.colab import drive
drive.mount('/content/drive')
但是我的目录不是以/content/drive开头的,我尝试过的以下事情都导致ValueError: Mountpoint must be in a directory that exists:
drive.mount("/content/drive/folders/my_folder_name")
drive.mount("content/drive/folders/my_folder_name")
drive.mount("drive/folders/my_folder_name")
drive.mount("https://drive.google.com/drive/folders/my_folder_name")
如何挂载不以/content/drive 开头的谷歌驱动器位置?
【问题讨论】:
-
您也可以挂载整个驱动器,然后保存/访问特定子文件夹中的文件。
-
我错了,不可能挂载子文件夹。只需安装整个驱动器,然后访问代码中的子文件夹。 stackoverflow.com/questions/53183525/…
标签: python google-drive-api google-colaboratory mount-point