Is there a way to make a desktop shortcut for Jupyter Notebook?

Viewed 6194

Currently, I access Jupyter notebook by opening Anocanda Navigator then opening the notebook link. I have tried to bookmark the webpage but most of the time it doesn't work since it is a local page and I think some of the files are still "running" (I am clearly not an expert here and well aware of how stupid this may sound). Is there any way to have Jupyter Notebook as its own desktop link without having to open it via Anaconda?

5 Answers

For Windows, you can create a shortcut pointing to the following path:

%PY_HOME%\python.exe %PY_HOME%\cwp.py %PY_HOME% %PY_HOME%\python.exe -m jupyter notebook

Where %PY_HOME% is my environment variable pointing to the Anaconda folder (example: C:\Users\myuser\AppData\Local\Continuum\anaconda3). It's useful to use the environment variable because you may run out of characters.

If you want to run a especific environment:

%PY_HOME%\python.exe %PY_HOME%\cwp.py %PY_HOME%\envs\myenvironment %PY_HOME%\envs\myenvironment\python.exe -m jupyter notebook

You could make a bat file like so and put it in your desktop

start_jupyter.bat

:: enable anaconda environment
set root=C:\ProgramData\Anaconda3
call %root%\Scripts\activate.bat %root%

:: start jupyter
call cd "C:\Users\<USER>\<JUPYTER DOCUMENT ROOT>"
call jupyter notebook

pause

If you are on windows, open the search function on your nav bar on the bottom. Type "Jupyter Notebook". It should populate with your notebook. Then, right click on it and select "Open file location". This will take you to the file explorer. Finally, on the Notebook application that you use to run the Jupyter Notebook, right click "Copy". Then go to your desktop, and right click. Select "Paste shortcut", and Eureka! You should have the application shortcut on your desktop.

you can launch your jupyter notebook from remote server by trying on cmd prompt:

jupyter notebook --no-browser --port=8080

or run the following command to launch with default port:

jupyter notebook --no-browser

You can create a text file on your desktop and paste the following line into it:

jupyter notebook

Then save the file as Jupyter Notebook.bat and use it as a shortcut for Jupyter Notebook.

Related