How do I start jupyter notebook from command-line to run in my current directory, without editing config files or passing hard paths?

19,615

Solution 1

Best solution found so far (on Unix):

jupyter notebook --notebook-dir  `pwd` &

because

jupyter notebook --notebook-dir  . &

(relative-paths) won't work for commands from inside the notebook.

Solution 2

If you are on Windows, go to command prompt by typing cmd in search box. In cmd prompt, change directory to the path where you want to open Jupyter notebook. This can be done by typing

cd C:\your path here \

Next type in the changed path and press enter/

jupyter notebook

Similarly you can type 'jupyter lab' for jupyter lab

And you are done.

Share:
19,615
smci
Author by

smci

Data Science, Python/pandas/R, ML, NLP, basic Scala, Spark

Updated on June 04, 2022

Comments