[英]google drive address in google colaboratory
I am new to google colaboratory.我是谷歌合作实验室的新手。
In My Drive there are my required files.在我的云端硬盘中有我需要的文件。 the address of train.py file is:
train.py 文件的地址是:
gdrive/My Drive/Colab Notebooks/Project_Folder/DELTA-master/DELTA-master/train.py
. gdrive/My Drive/Colab Notebooks/Project_Folder/DELTA-master/DELTA-master/train.py
。
I use this address in a cell as follow to run train.py:我在一个单元格中使用这个地址来运行train.py:
. python gdrive/My Drive/Colab Notebooks/Project_Folder/DELTA-master/DELTA-master/train.py
but I get this error:但我收到此错误:
FileNotFoundError: [Errno 2] No such file or directory: 'gdrive/My Drive/Colab Notebooks/Project_Folder/DELTA-master/DELTA-master/train.py'
FileNotFoundError:[Errno 2] 没有这样的文件或目录:'gdrive/My Drive/Colab Notebooks/Project_Folder/DELTA-master/DELTA-master/train.py'
Can anyone help me?!谁能帮我?!
from google.colab import drive
drive.mount('/content/drive')
Use this to generate an authentication code and make the drive accessible.使用它来生成验证码并使驱动器可访问。
Then in colab, under files in the left side tab, see if you can locate the file.然后在 colab 中,在左侧选项卡中的 files 下,查看是否可以找到该文件。 Then right click on the file and select copy path.
然后右击文件,select复制路径。
Or you can use或者你可以使用
/content/drive/My\ Drive/ <path to your file in gdrive>
Don't forget to put "\" whereever the foldername has space in it不要忘记在文件夹名称中有空格的地方放置“\”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.