jupyterlab-google-drive
jupyterlab-google-drive copied to clipboard
import package from Google Drive
Say I want to share a notebook which references another python script I wrote, so I include it in the same drive folder as the notebook.
Presently, import myscript from the notebook fails because the script is not actually in my working directory. Is there a way to effectively add the current Drive directory to the python path? Would that involve storing a local copy of scripts?
Cheers, Oliver
Unfortunately, you are correct. The Python kernel is running on your local server, and those are the only files it is able to see.
It may be possible to use a fuse-based Google Drive mount, but I have not investigated that.
Not sure if this helps, but I came across this same problem. It seems like the "working directory" when working with files from Google Drive is the root directory in which JupyterLab was launched.
Copying my script file to that folder worked. Plus output files from the notebook were also written at that same location.
Hope that helps somewhat until a better solution is found.