Answers for "how to open .py file in google colab"

2

google colab install python package

!pip install scipy
Posted by: Guest on June-14-2021
1

colab import python file

# In case anyone else is interested to know how to import files/packages 
# from gdrive inside a google colab. The following procedure worked for 
# me:

# 1) Mount your google drive in google colab:

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

# 2) Append the directory to your python path using sys:

import sys
sys.path.append('/content/gdrive/mypythondirectory')

# Now you should be able to import stuff from that directory!
Posted by: Guest on April-08-2021

Code answers related to "how to open .py file in google colab"

Browse Popular Code Answers by Language