How to import folder from gdrive to Google colab

1.2k views Asked by At

I have .py extension files in folder and that folder i putted in google drive and now I want to import that folder Google collab then how to do because I am getting module found error.

First I tried to mount google drive and then I tried import the folder then it giving me no module found error.

1

There are 1 answers

0
Jan Nowiński On

Mount the folder first (new folder will be created in content directiory, named drive):

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

Move to file to current collab directory:

!cp ./drive/PATH_TO_YOUR_FILE ./

Your import should work now!