How to solve the problem that jupyter notebook cannot be opened in the new environment in anaconda

1. First make sure you have downloaded jupyter notebook. If you have not downloaded it, you can open your own new environment in anaconda.

Change to the Home interface to install jupyter notebook or win+R or anaconda prompt and enter install jupyter notebook. This is the location of the anaconda prompt.

2. Enter the following command in cmd or Anaconda Prompt

jupyter notebook --generate-config

Then a configuration file jupyter_notebook_config.py will be generated, and the path corresponding to the file will be given. Copy the path and paste it below and press Enter.

Then a configuration file will pop up, find #c.NotebookApp.browser='' in it, and write it below

import web browser

webbrowser.register('chrome',None,webbrowser.GenericBrowser (u'********'))

c.NotebookApp.browser = 'chrome'

(Chrome is recommended in Anaconda, if not, it is recommended to download one)

Among them, ******* is the path of chrome. Right-click chrome on your computer to open the file location and copy the path there. Change the single slash to double slash. For example: C:\\Users\\丿QLS丶\\AppData\\Local\Google\\Chrome\\Application

After writing, remove the # before #c.NotebookApp.browser=''

4. Right-click anaconda on the desktop, click Properties and change the single slash inside to double slash. In some computers, there will be other English strings after script.py. Delete the things after script.py.

 

Guess you like

Origin blog.csdn.net/m0_55216608/article/details/117635267