2

(Please read careful before marking this as duplicated)

In Windows 7 I installed Python 3 and Jupyter from Miniconda with conda install jupyter. The installation included a shortcut

enter image description here

which I find very useful because I even built one myself some time ago when I wasn't working with Miniconda but pure Python.

So, in Anaconda Prompt I did the well known jupyter notebook --generate-config to change the browser and set my notebooks root path.

enter image description here

The problem is that it still starts up from the user home directory even when it is actually taking the browser configuration I set. That means it is reading the config file but ignoring the notebooks directory setting.

enter image description here

I already tried the path with escaped backslashes and double quotes. I suspect it might be the parameters passed on in the shortcut, which I don't understand by the way.

enter image description here

Destination: C:\Users\4217109\AppData\Local\Continuum\miniconda3\python.exe C:\Users\4217109\AppData\Local\Continuum\miniconda3\cwp.py C:\Users\4217109\AppData\Local\Continuum\miniconda3 C:\Users\4217109\AppData\Local\Continuum\miniconda3\python.exe C:\Users\4217109\AppDa

Any ideas to solve this?

Javier
  • 632
  • 3
  • 8
  • 19
  • have you tried launching it with `jupyter-notebook.exe --notebook-dir=C:\your\path`? – jeschwar Dec 13 '18 at 21:51
  • Actually `jupyter-notebook.exe` or `jupyter notebook` works as desired in Anaconda Prompt. In cmd shows an exception I think is related to the environment I used to install Python and Jupyter. So probably the parameters in the shortcut are overriding the directory setting only. – Javier Dec 14 '18 at 12:29
  • Figure out which environment you want to use (e.g., `C:\path\to\your\env\python.exe`) and then try putting the correct path in your shortcut, i.e., `C:\path\to\your\env\Scripts\jupyter-notebook.exe` – jeschwar Dec 14 '18 at 15:56
  • Setting the destination to `C:\Users\4217109\AppData\Local\Continuum\miniconda3\Scripts\jupyter-notebook.exe` raises the exception I mentioned. When I built my own shortcut I called `C:\Windows\System32\cmd.exe /k jupyter notebook && exit`. Is there a way to do the same with Anaconda prompt? – Javier Dec 17 '18 at 13:41

1 Answers1

0

Consider changing c.NotebookApp.default_url in ~config.py


Details

You will be able to find " jupyter_notebook_config.py " file.

Please check this answer if you can't. https://stackoverflow.com/a/40514875/14180528

Then, find c.NotebookApp.default_url and change it for your purpose.
Example : c.NotebookApp.default_url = /tree/Onedrive/Jupyter

zabop
  • 3,885
  • 3
  • 14
  • 47
WBN
  • 3
  • 2