SoFunction
Updated on 2024-11-16

Jupyter notebook can not open the web page after running the problem solved

Preface:

Recently, I was taking a course on Python data processing, and I had to use Jupyter, so I installed anaconda first, and when I was about to run Jupyter I clicked launch, and it didn't respond ...... I clicked launch again, and it still didn't respond ...... I was very puzzled, normally it should pop up a web page to say that it is right, so I started to check the Internet, and finally solved the problem. Now the specific realization of the process to write out.

Main article:

First enter the command: jupyter notebook --generate-config in a command line window:

Given that we encountered "can not find the command" this problem is more, I will do a little more here to configure the environment variables to add, encountered this problem friends can pay attention to.

First of all, right-click on "My Computer" and open "Properties", there is an "Advanced System Settings" on the right side of the click on it, then a box will pop up, click on the environment variables in that box, you will enter the to the following interface:

        Then add the following three paths to both Path in the user variable and Path in the system variable:          

        This solves the problem of "jupyter command not found".

Then it will create a file called: jupyter_notebook_config.py, there is a specific path in the terminal, just copy it to my computer and look for it:

Find this file and open it with Notepad:

Find the place: # = '' and add the following code:

import webbrowser
('chrome',None,
(u'C:\Program Files\Google\Chrome\Application\'))
 = 'chrome'

Specifically, it looks like this:

Where u' followed by the path of your browser, like I use Google Chrome, fill in the path of Google Chrome. Then reopen anaconda and launch again you can see the web page open.

How to view the exact path of the browser:

Right-click on the icon of this browser and click on "Open File Location" to find it:

Clicking LAUNCH brings up a page like this:

If you still can not solve this problem, you can find whether there are other problems, if the web page can not open the case, the probability is that there is no specified browser to open, in the config inside the configuration of the general can be opened.

PS: If after successfully opening the web page, there is no response after running the code, there is nothing in in[ ], it jumps to the next line. And the circle in the upper right corner is solid, showing that the kernel is busy, you can refer to my second post:

jupyter notebook runs the code unresponsive and in[ ] is *not* available

to this article on the Jupyter notebook run after the problem can not open the web page to solve the problem of the article is introduced to this, more related Jupyter notebook run after the web page can not open the content of the search for my previous posts or continue to browse the following related articles I hope that you will later support me more!