Make the initial directory of JupyterLab a Google Drive mounted on an external HDD

When you open JupyterLab, the tree on the left shows the user under user on C drive. I use the Google Drive "Backup and Sync" (* not Google drive file stream) folder created under another drive (D: ) for work, so I want to make the tree that is displayed initially there.

Change the initial directory of JupyterLab

I referred to Next article. The article linked above is from a Jupyter notebook, but I used it as a Jupyter Lab. First, start the Anaconda prompt,

jupyter lab --generate-config

Then, C: \ Users \ username \ .jupyter \ jupyter_notebook_config.py was created. Line 266 of this

## The directory to use for notebooks and kernels.
#c.NotebookApp.notebook_dir = ''

Because there was

## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'D:\GoogleDrive'

Then it worked. Almost the same as jupyter notebook.

Recommended Posts

Make the initial directory of JupyterLab a Google Drive mounted on an external HDD
Make a copy of a Google Drive file from Python
Create a shape on the trajectory of an object
The story of the escape probability of a random walk on an integer grid
Get the filename of a directory (glob)
Around the authentication of PyDrive2, a package that operates Google Drive with Python
Make a copy of the list in Python
Calculate the probability of outliers on a boxplot
Specify the volume on linux and make a sound
Make a BOT that shortens the URL of Discord
Make your cursor a photo of your choice on Linux
Make a note of the list of basic Pandas usage
Make a breakpoint on the c layer with python
Make the model a string on a Django HTML template
A Study on Visualization of the Scope of Prediction Models
How to easily draw the structure of a neural network on Google Colaboratory using "convnet-drawer"
How to make an interactive LINE BOT 004 (answer the closing date of a listed company)