In this post, we will run through how to open a Jupyter notebook on Windows Jupyter notebooks are one way engineers can write and execute Python code. Jupyter notebooks contain Python code, the output of that code produces when it is run and markdown cells to explain what the code means. A Jupyter notebook can be started from the Anaconda Promptthe Windows start menu or by using the Anaconda Navigator. The first way to start a new Jupyter notebook is to use the Anaconda Prompt. Go to the Windows start menu and select [Anaconda Prompt] under [Anaconda3].
Download Anaconda at the following link: Anaconda. This will start a Jupyter notebook. The output in the terminal will look something like below:. A web browser should open and you should be able to see the Jupyter file browser :. You will see a new tab open in your web browser. This new browser tab contains a Jupyter notebook.
To rename the Jupyter notebookclick the file name at the top of the page to the right of the Jupyter icon. Try typing the code below into the first cell in the Jupyter notebook to the right of the In [ ]: prompt. The last way to open a Jupyter notebook is by using the Anaconda Navigator.
This will open the Anaconda Navigator. In the middle of the page, in the Jupyter notebook tile, click [Launch]. Toggle navigation Python for Undergraduate Engineers. About Book Now Archives. Orientation Opening a Jupyter Notebook on Windows.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. If I run jupyter notebookit pops up an empty instance of vscode for me - rather than a browser.
I believe this is because. It took me a few tries to figure out why this was happening. We should maybe have better browser detection? I just run --no-browser now and copy the URL manually. Same thing happened to me - I suspect vscode has been set as the default handler for html files and jupyter notebook uses the default association.
We use the python webbrowser module to pop up the browser. I think this is the general problem. I don't personally have a problem with setting browser environment, but this means the default experience for people who are told to run 'jupyter lab' on their terminal and a 'browser will pop up' is going to fail. That seems confusing and unideal. I don't know how to get around that. OK, I'm assuming that the webbrowser module is calling xdg-openwhile is a wrapper around the desktop's open command e.
Probably the best we can do is try to detect that the default browser is something like xdg-open and override the normal logic to find a browser. The downside is that we may launch the 'wrong' browser, not the default the user has configured in their system, in cases where we currently get the right one. But it should at least ensure that most users get a browser rather than an editor. Of course, with problems like this it's always tempting to add a config option to 'do it the old way'.
I'm trying to avoid that. Settings shouldn't make it too easy to remove security, because in a few years people will follow instructions they find to change the setting without understanding the implications. You can already solve this problem with configuration by setting e.
So it's only about how to handle the default, unconfigured case. I can reproduce this on mac if I associate html files with an editor doesn't appear to be the default. Mac uses webbrowser.
I think discovering the default browser on all platforms is going to be a pretty big pain, but I can look into it on mac, at least. For Linux, the webbrowser module is already calling xdg-settings get default-web-browser to find a default; on my Fedora system, that makes it explicitly launches Firefox rather than xdg-open. But I guess for yuvipanda and bharathgs either the setting isn't set or the command to read it isn't available. I don't know how many users would end up with a browser that's not their preferred default that way, but hopefully it's easy to configure your way out of that.
I had the same issue on Ubuntu linux.
Same thing happened to me yesterday - after an odd event in my ubuntu The Jupyter Notebook App can be launched by clicking on the Jupyter Notebook icon installed by Anaconda in the start menu Windows or by typing in a terminal cmd on Windows :. This will launch a new browser window or a new tab showing the Notebook Dashboarda sort of control panel that allows among other things to select which notebook to open.
When started, the Jupyter Notebook App can access only files within its start-up folder including any sub-folder. No configuration is necessary if you place your notebooks in your home folder or subfolders. Otherwise, you need to choose a Jupyter Notebook App start-up folder which will contain all the notebooks. See below for platform-specific instructions on how to start Jupyter Notebook App in a specific folder.
To launch Jupyter Notebook App :. Closing the browser or the tab will not close the Jupyter Notebook App. To completely shut it down you need to close the associated terminal. Closing the browser will not shut down the server. You can reopen the previous address and the Jupyter Notebook App will be redisplayed. Since with a single Jupyter Notebook App you can already open many notebooks, we do not recommend running multiple copies of Jupyter Notebook App.
Closing the notebook browser tab, will not shut down the kernelinstead the kernel will keep running until is explicitly shut down. Alternatively, the Notebook Dashboard has a tab named Running that shows all the running notebooks i. Download the notebook you want to execute and put it in your notebook folder or a sub-folder of it. Save notebooks : modifications to the notebooks are automatically saved every few minutes.
Pay attention to not open the same notebook document on many tabs : edits on different tabs can overwrite each other!
To be safe, make sure you open each notebook document in only one tab. If you accidentally open a notebook twice in two different tabs, just close one of the tabs.
More info on the Jupyter Notebook App environment see References.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub?
Sign in to your account. When I run "jupyter notebook" from the Anaconda prompt, I get a redirect notice and then just a blank webpage.
Subscribe to RSS
No directories or menus or any text whatsoever. I am running windows 10 x64 jupyter v 4. I cannot find any relevant posts that might help. The only thing I can do is cntl-c the Anaconda Prompt. I don't get any prompt to kill the process. I also get : [I I can't get Chrome to work. I do get Edge to work somewhat.
I had try the way that changing version of notebook. So, I had to install an anther version of python and jupyter to fix that. This seems to be a duplicate of issue I am also having this issue and i noticed something while opening devTools on the browser and looking at the Terminal console.
Since this directory doesnt exist on my computer it returns a This will be fixed by 5. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up. New issue. Jump to bottom. Milestone 5. Copy link Quote reply. This comment has been minimized. Sign in to view. I also have Python 3.
This was referenced Mar 21, Jupyter notebook blank page on start up Hi, I am also having this issue and i noticed something while opening devTools on the browser and looking at the Terminal console. Hoping this helps and gets it fixed soon. Thank you. Sign up for free to join this conversation on GitHub.
I am using Jupyter Notebook version : 4. Earlier everything worked fine, but recently this started, I tried using different port likeand after 2 or three runs they also stop working. I am using anaconda on windows I tried similar questions but they are not working for me. Any help will be appreciated.
Learn more.Jupyter Notebook: Launch Jupyter Notebook in Specific Windows Directory
Jupyter notebook not opening in browser Ask Question. Asked 3 years, 2 months ago. Active 3 years, 2 months ago. Viewed 5k times. Have you tried connecting to localhost without the token? Active Oldest Votes. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Featured on Meta. Feedback on Q2 Community Roadmap. Technical site integration observational experiment live on Stack Overflow.
Dark Mode Beta - help us root out low-contrast and un-converted bits. Question Close Updates: Phase 1.My guess based on what you posted is that you have installed and have the notebook running; however, you need to connect your local port to the remote port.
This is done through an SSH tunnel. You leave the current window running the notebook open and open another terminal window and connect via another SSH connection to the remote connection. You specify the ports to connect via the tunnel at that point. There is a slightly different take here where you specify the port at the time you start the notebook server.
I actually follow that approach more closely and add in the no-browser option, and so my command to start the notebook server is jupyter notebook --no-browser --port Note that I still only have as the inbound rule on the remote EC2 machine.
Nothing involving in the rules. This page discusses the SSH tunnel command more. Once the jupyter notebooks are up and running and I get the URL with token displayed on bash as on the postI am unable to paste the next line code on my bash it accepts no more text.
I try entering a new command by right clicking on the bash macso I can run and enter the new command in the shell. The result is a new bash opens up and I am informed and I am informed I am logged out, it ends with [Process Completed]. I found finally! This tutorial explains it well. I cannot navigate through my computer and find the notebooks I wish to run. Glad that other tutorial helped clarify things for you.
Next, about your comment that you cannot navigate through your own computer when you are connected to the notebook server in your browser:. You are connected remotely to an Amazon machine and that is the system the notebooks are running on and the system to which the notebook server has access to by default.
You can get your notebooks onto the remote machine a number of ways. One is to use the Jupyter notebook dashboard interface in the classic notebok interface and upload via your browser. This process is much easier these days if you are using JupyterLab interface instead because it lets you drag-and-drop from your local computer. Both of those options are discussed here. You may be able to find more recent guides to using those approaches with EC2. Likewise, anything you generate on the remote machine, you need to download to your local system as well.
Thanks to your responses, not only have I learnt a lot, but also I have learnt about resources I did not even know they existed! After doing so, I am told the browser cannot connect.
I would appreciate if someone could shed some light on this, thanks. I just set one up right now using my usual approach and it worked. I follow your indication and everything goes well until I complete step Once the jupyter notebooks are up and running and I get the URL with token displayed on bash as on the postI am unable to paste the next line code on my bash it accepts no more text I try entering a new command by right clicking on the bash macso I can run and enter the new command in the shell.
Does it mean I have to upload them prior running them? Many thanks for your support. Opening another, new terminal window while leaving the other untouched is important.
Next, about your comment that you cannot navigate through your own computer when you are connected to the notebook server in your browser: You are connected remotely to an Amazon machine and that is the system the notebooks are running on and the system to which the notebook server has access to by default.
I really appreciate. Again, thank you very much fomightez Sincerely, Josep Maria.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account. However, the following text printed after calling jupyter notebook helps explain my issue. Currently, the browser window opens with the first of those two links. And since Chrome is a windows browser, that address doesn't exist for it. A solution is to download firefox or chrome in your WSL By downloading the browser you will need to use Xlaunch or another visual hoster.
This should work, make sure to test that you have the browser working after installing before testing with jupyter notebook. Caveats: per my testing, new windows got opened up automatically after putting in the settings listed above.
Yet, the Firefox window is "oversized," and I needed to look for it and resize it properly. Please advise if you have a better way to rescale the auto-started Firefox by jupyter lab command. Before switching to firefox on WSL, jupyter notebook did not launch at all when I got the browser configured to be the local Chrome on Windows. Instead, jupyter lab got me the reported troublesome behavior, since May or so.
I clearly recall that such starting trouble did not exist back in I installed firefox using the command 'sudo apt install firefox'. I tried to open firefox from the terminal using the following commands. But it gave me the following error.
Jupyter Notebook auto launch browser from WSL
Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Broadway display type not supported: localhost Error: cannot open display: localhost Does it give you an error?
No worries. You will then want to look up where it is by issuing which firefox in your command line. When I try to start firefox by simply typing 'firefox' in the terminal, I get the following error.
Then, within the same terminal session, try to run firefox directly? Please note, the performance of these firefox running on WSL can be another hassle: depending on your X-server, things may or may not work smoothly. It gave me the following error for both. I understandwhat you are saying. I should be able to simply copy past the jupyter notebook link on firefox or chrome and it should work. I am just unable to understand what is wrong. This is more of a WSL issue now.
Sorry for not able to help further. Dear martin So how I can make such address i. Hi thomasaarholt! I recently decided to try WSL and also wanted to solve this.
There is still a caveat. Because of some permission misshap, the jupyter notebook will not work in some folders especially dear to windows, such as your user folder. It still works in subfolders.