Custom exe to open Jupyter Notebook w/ single click? (Win10)

  • Python
  • Thread starter deltapapazulu
  • Start date
In summary: C:\Users\JohnD>jupyter notebookIt will open Jupyter Notebook in your default browser, depending on the setting in that browser.
  • #1
deltapapazulu
84
12
TL;DR Summary
How create executable to start jupyter notebook w/o using command line.
Seems so trivial but haven't found good straightforward solution.

I've installed Jupyter Notebook on Windows 10 (using for Python & Julia) WITHOUT Anaconda. Don't like Anaconda for reasons not going to discuss here.

In order to start Jupyter Notebook you have to open command prompt and type in 'jupyter notebook'.

(here is my inquiry) I want to create an executable that I can click on from either desktop or task tray and it opens jupyter notebook without having to open a command prompt and typing in 'jupyter notebook'. Seems like it should be really simple to do this.

Anyone know how?
 
Technology news on Phys.org
  • #2
Your start menu should have an Anaconda folder with a link to start Jupyter inside of it. Have you tried that?
 
  • #3
Borg said:
Your start menu should have an Anaconda folder with a link to start Jupyter inside of it. Have you tried that?

I mentioned in my OP that have installed Jupyter Notebook WITHOUT Anaconda. Anaconda has tons of stuff that I don't need and has a history of conflicting with things in unexpected and unwanted ways, even outright breaking someone's configurations. 5 years ago Anaconda was horrible and many seasoned Python users advised against installing it. THAT SAID, supposedly Anaconda has worked out some of these issues since then but I still choose not to use it because its just a lot of bloat if all one is going to do is mess around with Julia in Jupyter Notebook.
 
  • #4
right click -> New -> Shortcut -> location box -> cmd /c jupyter notebook
 
  • Like
Likes deltapapazulu
  • #5
sysprog said:
right click -> New -> Shortcut -> location box -> cmd /c jupyter notebook

thank you that works but I need it to specifically use the cmd within my user profile C:/Users/ME

by the way I am assuming you mean place ' cmd /c jupyter notebook ' into the location box. Again, that works but what happens is it opens my whole C:/Windows/System32 directory in browser and that takes literally 12 seconds for it to finishing opening.
I need it to open in C:/Users/ME , my home folder just like if I were to open cmd from my User profile. The 'cmd' the way you said it uses the admin cmd in my root.
 
  • #6
deltapapazulu said:
thank you that works but I need it to specifically use the cmd within my user profile C:/Users/ME

by the way I am assuming you mean place ' cmd /c jupyter notebook ' into the location box. Again, that works but what happens is it opens my whole C:/Windows/System32 file in browser and that takes literally 12 seconds for it to finishing opening.
I need it to open in C:/Users/ME , my home folder just like if I were to open cmd from my User profile. The 'cmd' the way you said it uses the admin cmd in my root.
C:\Windows\System32 is not a file; it's a directory, and it's opened by the Windows shell, explorer.exe; not by the browser.

In the shortcut location box, you can specify the path to the command, and/or to cmd:

right click -> New -> Shortcut -> location box -> C:\Windows\system32\cmd /c C:\Users\ME\jupyter notebook

or,

right click -> New -> Shortcut -> location box -> C:\Windows\system32\cmd /c cd C:\Users\ME & jupyter notebook

Unless you have an inordinately long %PATH% environment variable, which you can check by issuing the 'path' command from a command prompt, that's not going to be any faster than the path being found implicitly by the system looking through the list of directories specified in that variable.

Issuing the 'jupyter notebook' command from a shortcut should not cause it to run slower than than if it is manually issued from a command prompt.
 
Last edited:
  • #7
sysprog said:
right click -> New -> Shortcut -> location box -> cmd /c jupyter notebook

sysprog said:
C:\Windows\System32 is not a file; it's a directory, and it's opened by the Windows shell, explorer.exe; not by the browser.

:In the shortcut location box, you can specify the path to the command, and/or to cmd:

right click -> New -> Shortcut -> location box -> C:\Windows\system32\cmd /c C:\Users\ME\jupyter notebook

But unless you have an inordinately long %PATH% environment variable, which you can check by issuing the 'path' command from a command prompt, that's not going to be any faster than the path being found implicitly by the system looking through the list of directories specified in that variable.

Issuing the 'jupyter notebook' command from a shortcut should not cause it to run slower than than if it is manually issued from a command prompt.

regarding when I called System32 a file, I realize it is a directory that was something akin to a typo, I went back and edited that minutes after I posted it. Sorry about that. Regarding when I said something about opening in browser what I meant was that when I run this command

C:\Users\JohnD>jupyter notebook

it opens Jupyter Notebook in my browser using

http://localhost:8888/tree

and the directory it does so with is my home folder.

Regarding how long it takes to do this, what is causing it to take so long is C:\Windows\system32 is a massive directory and that is what is taking it so long to finish opening in browser.

I'm working with some things will let you know if worked.

Thank you.
 
  • #8
Please compare opening 'jupyter notebook' via shortcut, with/against opening it via typing it into the command prompt.
 
  • #9
sysprog said:
Please compare opening 'jupyter notebook' via shortcut, with/against opening it via typing it into the command prompt.

I found solution. Thanks for your help. Honestly I was just being kind of lazy when I started this thread. Here is what I was looking for (see link below). Includes the step you mentioned.

I did what you said, then changed "start in" in shortcut properties to my home folder and that did what I needed. I put the shortcut into my taskbar and now all I have to do to start Jupyter Notebook with it starting from my home folder is click on the taskbar icon.

Launching Jupyter Notebook Using an Icon/Shortcut in the Current Working Directory Folder

or whatever directory you want depending on what you enter in the "start in" field.

Again thanks for help.

 
  • Like
Likes sysprog

1. How do I create a custom exe to open Jupyter Notebook with a single click on Windows 10?

To create a custom exe to open Jupyter Notebook with a single click on Windows 10, you will need to use a program called PyInstaller. This program allows you to bundle your Python code and its dependencies into a single executable file.

2. Can I customize the icon for the custom exe?

Yes, you can customize the icon for the custom exe by using a tool such as Resource Hacker. This tool allows you to replace the default icon with your desired icon.

3. How do I ensure that the custom exe opens the correct Jupyter Notebook file?

You can specify the exact path to the Jupyter Notebook file in the PyInstaller command when creating the custom exe. This will ensure that the custom exe opens the correct Jupyter Notebook file every time.

4. Can I share the custom exe with others?

Yes, you can share the custom exe with others by using a file sharing service or by directly sending the file to them. Keep in mind that the custom exe will only work on Windows 10 computers.

5. Is it possible to create a custom exe for other operating systems?

Yes, it is possible to create a custom exe for other operating systems such as macOS and Linux. However, you will need to use different tools and methods to create the custom exe for each operating system.

Similar threads

  • Programming and Computer Science
Replies
25
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Special and General Relativity
Replies
13
Views
2K
  • Special and General Relativity
Replies
1
Views
2K
Back
Top