Include files in a notebook



I’m wondering if it’s possible to:

  • git clone a library on a collab and somehow add the files to the path and use them (I managed to do only git clone…)
  • include functions from a notebook stored in a .py file (let’s say helper functions in a, in the same storage path)



Hi Andras,

If the libraries are Python libraries you can pip install [0] them in your container. Pip even supports git remote urls [1], so no need to clone beforehand.

For the second question, I am not sure if I understand correctly, since a notebook file is essentially a json file.

[0] Execute !pip install foo in a notebook cell