[英]How to run a script from a mounted Google drive. The issue is that the google drive folder has a space in its name
I mounted my drive using我安装了我的驱动器
from google.colab import drive
drive.mount('/content/drive')
I tried to run a script using我尝试使用运行脚本
!python /content/drive/My Drive/script.py
But got this error但是得到了这个错误
python3: can't open file '/content/drive/My': [Errno 2] No such file or directory
I think the issue is that the 'My Drive' folder has a space.我认为问题在于“我的云端硬盘”文件夹有空间。 Is there a workaround?有解决方法吗?
You need to add a backslash.您需要添加一个反斜杠。
!python /content/drive/My\ Drive/script.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.