【问题标题】:colab research python can not connect to the gdrivecolab研究python无法连接到gdrive
【发布时间】:2019-06-11 14:13:48
【问题描述】:

我试图在我的 colab 研究 ipython 中连接到 gdrive。但是今天早上我写这段代码的时候,

from google.colab import drive
drive.mount('/content/drive/')

它给我一个错误代码;

ValueError: Mountpoint must be in a directory that exists 

我无法连接到 gdrive,可能是什么原因? 谢谢

【问题讨论】:

标签: connection google-colaboratory


【解决方案1】:

实际的解决方法不是添加 force_remount=True,而是将 arg 中的尾随 / 删除到 drive.mount()

【讨论】:

    【解决方案2】:

    其实我得到了答案。 取而代之

     from google.colab import drive
     drive.mount('/content/drive')
    

    下面需要输入

    from google.colab import drive
    drive.mount('/content/drive', force_remount=True)
    

    谢谢

    【讨论】:

      猜你喜欢
      • 2016-12-13
      • 2022-01-27
      • 1970-01-01
      • 2015-09-09
      • 2013-12-26
      • 1970-01-01
      • 2019-04-19
      • 2015-07-01
      • 1970-01-01
      相关资源
      最近更新 更多