armin ariana
armin ariana

Reputation: 125

Having trouble with google colab

When I tried to mount google drive on google colab I got this error. Any help?enter image description here

Upvotes: 1

Views: 449

Answers (2)

This code will work.

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

After execute this code you will be asked for permission to give drive access. After that you will be able to browse your drive directory by following commands:

cd drive      //Change directory to drive folder
cd My Drive   //Change directory to your Google Drive folder
ls            //List of drive folder

Upvotes: 0

jubueche
jubueche

Reputation: 793

Does this work for you?:

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

  with open("/content/gdrive/My Drive/hello.npy", 'wb') as outfile:
      np.save(outfile, data)

Upvotes: 0

Related Questions