如何在Jupyter Notebook中连接到Python 3内核?

时间:2019-03-23 07:02:22

标签: python jupyter-notebook kernel

我的Jupyter Notebook无法与Python 3内核建立连接。 Anaconda导航窗口显示:

Application notebook launch may have produced errors.

[I 12:48:19.596 NotebookApp] JupyterLab extension loaded from D:\Anaconda\lib\site-packages\jupyterlab
[I 12:48:19.596 NotebookApp] JupyterLab application directory is D:\Anaconda\share\jupyter\lab
[I 12:48:19.597 NotebookApp] Serving notebooks from local directory: C:\Users\ASH-PC
[I 12:48:19.597 NotebookApp] The Jupyter Notebook is running at:
[I 12:48:19.597 NotebookApp] http://localhost:8888/?token=4b94f2df0271a502e7c58a2103c9edd718fed4411906ff80
[I 12:48:19.597 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:48:19.644 NotebookApp] 

To access the notebook, open this file in a browser:
file:///C:/Users/ASH-PC/AppData/Roaming/jupyter/runtime/nbserver-3640-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=4b94f2df0271a502e7c58a2103c9edd718fed4411906ff80
[I 12:48:25.337 NotebookApp] Kernel started: 58e893ba-20af-4d44-8152-136f889ebc97
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\ASH-PC\\AppData\\Roaming\\jupyter\\runtime\\kernel-58e893ba-20af-4d44-8152-136f889ebc97.json'
Traceback (most recent call last):
File "D:\Anaconda\lib\site-packages\ipykernel\kernelapp.py", line 224, in init_connection_file
self.load_connection_file()
File "D:\Anaconda\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
info = json.load(f)
AttributeError: module 'json' has no attribute 'load'
[I 12:48:28.328 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\ASH-PC\\AppData\\Roaming\\jupyter\\runtime\\kernel-58e893ba-20af-4d44-8152-136f889ebc97.json'
Traceback (most recent call last):
File "D:\Anaconda\lib\site-packages\ipykernel\kernelapp.py", line 224, in init_connection_file
self.load_connection_file()
File "D:\Anaconda\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
info = json.load(f)
AttributeError: module 'json' has no attribute 'load'
[I 12:48:31.324 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\ASH-PC\\AppData\\Roaming\\jupyter\\runtime\\kernel-58e893ba-20af-4d44-8152-136f889ebc97.json'
Traceback (most recent call last):
File "D:\Anaconda\lib\site-packages\ipykernel\kernelapp.py", line 224, in init_connection_file
self.load_connection_file()
File "D:\Anaconda\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
info = json.load(f)
AttributeError: module 'json' has no attribute 'load'

已经尝试两次重新安装整个Anaconda和Python3。

0 个答案:

没有答案