-1

How do I change Jupyter Notebook's start-up folder to be the directory that I started it in terminal? I have tried jupyter notebook --notebook-dir=%CD% but it gave me an error:

[C 00:31:27.239 NotebookApp] Bad config encountered during initialization:
[C 00:31:27.239 NotebookApp] No such notebook dir: ''/Users/username/%CD%''

Is there a better way to change start-up folder on Jupyter Notebook? Thanks very much in advance.

RichS
  • 117
  • 4

2 Answers2

0

If I cd into a directory then both jupyter notebook and jupyter lab start in the current folder.

I am running Ventura (13.1).

malvoisen
  • 158
  • 7
  • Yeah I assume it was this way when Jupyter Notebook was initially installed on this machine. Someone changed the configuration and it will always start from a specific directory, which is annoying. I just figured out how to change it back. Thanks. – RichS Jan 27 '23 at 08:54
0

I changed the configuration of Jupiter Notebook and it worked. Here are the steps:

  1. find the configuration dir at jupyter --config-dir
  2. In the configuration dir, edit jupyter_notebook_config.py and change to or add this line c.NotebookApp.notebook_dir = ''

Now it will start from where the starting directory is.

RichS
  • 117
  • 4