0

when I launch a Jupyter notebook (which I installed through Anaconda), the explorer opens in C:\Users\Joe

However, when I open a terminal (New -> Terminal) it opens in C:\Users\Joe\Documents

Is it possible to change the starting directory of the terminal, so it matches the notebook explorer page?

I have already tried the following:

1) edit the 'Start in' field in windows PowerShell properties to my desired location. This didn't change anything - it's as if when jupyter opens the terminal it overrides this - though it seems to use PowerShell.

2) running jupyter notebook –generate-config, and inserting my desired path to c.NotebookApp.notebook_dir = "".

Any advice would be appreciated, thank you!

1
  • Update - sorry, I've resolved this myself but don't think I can delete the question? Commented Feb 23, 2019 at 11:50

1 Answer 1

0

Resolved this myself - found the answer here: Find the default local Jupyter directory

In the Anconda3 folder there is a file cwp.py, which determines where the working directory should be changed to. I commented out lines 26-30:

if exception: documents_folder, exception = get_folder_path(FOLDERID.PublicDocuments) if not exception: os.chdir(documents_folder) 

and the path in the terminal is no longer being modified.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.