(Python) What should I do if Jupyter Notebook fails to run the code and prompts an error and autosave fails? Can't link kernel?

Table of contents

1. Error reporting situation

1. Jump to the next line when running the code, and the code cannot be executed.

2. When modifying the file name, it prompts failure, and the word "error" appears.

Second, the underlying reasons

3. Solutions

4. It is recommended to use the original environment


As an excellent web editor, Anaconda's Jupyter Notebook is very suitable for writing Python programs, but it may not work properly due to reasons such as incompatible installation versions. For this reason, I have compiled the following methods to solve this problem  .

1. Error reporting situation

1. Jump to the next line when running the code, and the code cannot be executed.

 

2. When modifying the file name, it prompts failure, and the word "error" appears.

Second, the underlying reasons

The pyzmq version is too high to be compatible with Jupyter Notebook .

3. Solutions

  1. Open  Anaconda Prompt , enter the following code, delete the original pyzmq
	pip uninstall pyzmq

2. Enter the following code to install the lower version pyzmq

	pip install pyzmq==19.0.2

If the red text error: pip's dependency...  prompt  will pop up after installation  , you need pyqt5 and pyqtengine not greater than version 5.13. As shown below:

insert image description here

 3. Continue to enter the following two sets of codes in turn

	pip install --user PyQt5==5.12.3
	pip install --user pyqtwebengine==5.12.1

Restart Jupyter Notebook when you're done, and you're done! (As shown below)

4. It is recommended to use the original environment

 

I just use the original environment of python3 to solve the problem that the kernel cannot be linked 

 

Guess you like

Origin blog.csdn.net/weixin_64338372/article/details/130441362