【A connection to the Jupyter server could not be established.内核连接不上 】

项目场景:

Miniconda3 中 打开jupyter-lab时,出现内核连接不上的问题!!!!!

问题描述

A connection to the Jupyter server could not be established. JupyterLab will continue trying to reconnect.check your network connection or jupyter server configuration

原因分析:

连接不上内核嘛,就搜网上的资源,普通人能搜索到的解决方法都试过了,花费了一天半的时间,终于终于终于结束!!!!

解决方案:

1.第一步找到文件名为(io.py)的py文件
我的地址:D:\miniconda\envs\exercise_py3.8\lib\site-packages\IPython\utils\io.py

2.第二步该名称文件,以记事本形式打开

3.参考下述步骤,修改好文件
# setup stdin/stdout/stderr to sys.stdin/sys.stdout/sys.stderr
devnull = open(
‘null’
, “w”, encoding=“utf-8”)
atexit.register(devnull.close)
****

修改为devnull = open(‘null’, “w”, encoding=“utf-8”)
注意!!!只修改这一步即可!

最后就是大功告成,juoyterlab能够连接到内核,开始运行py文件啦~~~~~~

猜你喜欢

转载自blog.csdn.net/Pentium6666/article/details/124682198