【发布时间】:2019-02-11 13:45:37
【问题描述】:
当我尝试在 google colab 上安装 google drive 时,我收到了这个错误。有什么帮助吗?enter image description here
【问题讨论】:
-
欢迎来到 StackOverflow。请阅读有关如何提出好问题的帮助部分,因为这将有助于社区了解您的问题并为您提供好的答案:stackoverflow.com/help/how-to-ask
当我尝试在 google colab 上安装 google drive 时,我收到了这个错误。有什么帮助吗?enter image description here
【问题讨论】:
这对你有用吗?:
from google.colab import drive
drive.mount('/content/gdrive')
with open("/content/gdrive/My Drive/hello.npy", 'wb') as outfile:
np.save(outfile, data)
【讨论】:
此代码将起作用。
from google.colab import drive
drive.mount('/content/drive')
执行此代码后,您将被要求授予驱动器访问权限。 之后,您将能够通过以下命令浏览您的驱动器目录:
cd drive //Change directory to drive folder
cd My Drive //Change directory to your Google Drive folder
ls //List of drive folder
【讨论】: