I have successfully mounted Google Drive into Google Colab. Now I try to copy a file from Drive to Google Colab, but I see an error:cp: cannot stat 'MyDrive/lab2/methods_Nd.py': No such file or directory But that file exists on the Drive. The commands I use are:
cp: cannot stat 'MyDrive/lab2/methods_Nd.py': No such file or directory
# Mount Google Drive from google.colab import drive drive.mount('/content/drive') !cp MyDrive/lab2/methods_Nd.py methods_Nd.py
If someone had a similar problem, I will be glad to know the solution
@Cropus, To copy files from Google drive to Colab, You need to specify the complete path instead of realtive. Refer below path.
!cp /content/drive/MyDrive/lab2/methods_Nd.py methods_Nd.py
Give it a try.
1.4m articles
1.4m replys
5 comments
56.9k users