Change Jupyter Notebook Working Directory: A Beginner Guide

By | April 25, 2020

After you have started jupyter notebook, it will load a directory as its workspace. How to change this working directory? In this tutorial, we will tell python beginners how to do.

Preliminary

When we open jupyter notebook by browser, it will load all files in its working directory.

open jupyter notebook by browser

Our default directory is: C:\Users\fly165\workspace. If we want to change the working directory to other directory, we can do by following step.

Change the default working directory of jupyter notebook

We can use command below:

jupyter notebook --notebook-dir=directory_name

Where directory_name is the name of other direcotory.

For example:

jupyter notebook --notebook-dir=E:\workspace-nlp\Example

Which means we will change the working directory to: E:\workspace-nlp\Example

Run this command, you will get this result.

change jupyter notebook working directory

Then open jupyter notebook by your browser, you will find the working directory is changed.

change jupyter notebook working directory result

Leave a Reply

Your email address will not be published. Required fields are marked *