错误展示:

原因:
创建虚拟环境后,用conda install 了ipykenel,这里与我另一个环境中用python -m install 的ipykenel做一个对比,用python -m 安装的是可以正常运行jupyter notebook的:
1、在python3.6.0中用python -m 安装的,可以正常运行jupyter notebook

2、在python3.6.7用conda install 了ipykenel,报错的:

版本相同,唯一的不同是安装方式。看到有人说要升级pykernel,遂进行尝试,仍旧报错,错误如下:

错误:ERROR: Cannot uninstall 'ipykernel'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
既然错误中提示无法卸载原有版本ipykernel,遂尝试卸载conda 安装的ipykernel,重新安装;
conda uninstall ipykernel
python -m pip install ipykernel
具体界面如下:


重新启动jupyter notebook,这次内核连接成功。

解决Python 3.6环境下conda安装ipykernel冲突与重启成功案例
本文讲述了在Python 3.6环境下,通过conda安装ipykernel遇到的问题,包括错误信息、尝试升级和卸载的操作,最终成功重新启动Jupyter Notebook的过程。

被折叠的 条评论
为什么被折叠?



