当前位置:网站首页>Some common pitfalls in getting started with jupyter:

Some common pitfalls in getting started with jupyter:

2022-06-24 09:12:00 Night by night, night by night

1. The browser cannot automatically pop up

Solution steps :

① Press win+R, Press enter again , Go to the command line

② Enter at the command line jupyter notebook --generate-config

It is recommended to remember the location after searching , You may also need to make frequent changes to the configuration file .

This time will show config The location of the file . Or press... At the prompt [y/N] after , The config file location . After copying location , Use... In the configuration file ctrl+F Search for “c.NotebookApp.password=”

Add... Below the line :

import webbrowser
webbrowser.register(" Fill in your browser name , Such as chrome perhaps msedge",None,webbrowser.GenericBrowser(" Fill in your browser path "))    # Right click the path on the desktop , Click properties to view
c.NotebookApp.browser=" Fill in your browser name "   # Note that it's not a path

Then save and exit .

After that jupyter notebook You can automatically open it with your browser , Remember not to close the command line after opening it in the browser .

2. Use... In the specified folder jupyter notebook

① Open the just config.py file

②ctrl+F, Search for c.NotebookApp.notebook_dir, stay ' ' Input it and store it jupyter notbook The path to the file

Be careful : When writing the drive letter C:\\ Are the two \, When copying paths directly, there will be only one \.

Save and exit , Then it will be used in the folder you set up notebook 了 .

3. Unable to create new file , Unable to save new file , Unable to run code

resolvent :

Open the command line , Input pip install pyzmq==19.0.2  install pyzmq 19.0.2 Or an earlier version of pyzmq.

Refer to the post : About jupyter Execute code gram Bad file descriptor The wrong solution _suoke93 The blog of -CSDN Blog _bad file jupyter About jupyter Unable to execute code , Only new files and folders can be created , newspaper Bad file descriptor The wrong solution https://blog.csdn.net/suoke93/article/details/121707760 If you do not know whether you have successfully installed , have access to pip list View package information .

 

 

 

原网站

版权声明
本文为[Night by night, night by night]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240742457448.html