How to solve the problem that jupyter notebook cannot open the browser or the port is occupied

[Reprinted] https://blog.csdn.net/xc555/article/details/81944979

Problem: Win10 system, install Anaconda3 5.0.1, click jupyter notebook or use the anaconda prompt command line to open the browser, there is no response, find scripts from the anaconda installation path, there is jupyter notebook.exe in it, double-click directly to open it

 

Solution: Allow ipython.exe, pythonw.exe, jupyter-notebook.exe, jupyter.exe to communicate through Windows Firewall,

Specific operation: Control Panel - Windows Firewall - Allow a program or function to pass through Windows Firewall - Allow another program to run - Browse - Locate the python or Anaconda installation directory, select python.exe, Open - Add - OK. Add the others in the same way.

If it still cannot be opened, you need to further set the Win10 firewall port

Windows Firewall - "Advanced Settings", → "Inbound Rules"

Find the "ipython.exe" you just set, point properties - switch "protocol and port label" - "protocol type" to "any"

Then switch to the "Scope" tab - select all "Domain, Private, Shared" and confirm

Finally, repeat the above operations for pythonw.exe, jupyter-notebook.exe, and jupyter.exe in turn, and the result is great.

It may be that the Windows 10 firewall has stricter control over program communication, and sometimes prevents program communication without prompting, causing jupyter notebook to fail to open

***************************************************************************

In addition, it is recommended to install Anaconda in Win10 , do not use the default path for installation (choose another short path) , because after the default path is installed, the directory level where jupyter-notebook is located is too deep and the path string is too long, which exceeds the shortcut allowed The maximum number of characters, resulting in the incomplete path of the jupyter-notebook shortcut in the Anaconda menu, and the jupyter-notebook and browser cannot be opened.
 

Guess you like

Origin blog.csdn.net/PhilipJ0303/article/details/90417470