Jupyter Notebook:kernel error 解决
程序员文章站
2022-05-29 09:12:02
...
Jupyter Notebook出现kernel error
当时用Anaconda安装多个版本的Python的时候,时常由于安装和卸载多次Python导致Juoyter notebook不可用。常常导致如下结果
File”//anaconda/lib/python2.7/site-packages/jupyter_client/manager.py”, line 190, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File “//anaconda/lib/python2.7/site-packages/jupyter_client/launcher.py”, line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File “//anaconda/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “//anaconda/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or director
解决办法
- 运行
python -m ipykernel install --user
重新安装内核 - 如果有多个内核,先运行
conda create -n python2 python=2
,为Python2.7设置Anaconda变量,在Anacoda下使用activate pyhton2
切换python环境 - 重启jupyter notebook即可
小技巧
jupyter kernelspec list
查看安装的内核和位置
进入安装内核目录打开kernel.jason
文件,查看Python编译器的路径
转载于:https://www.jianshu.com/p/de39b46a978d
下一篇: Jupyter 笔记
推荐阅读
-
jupyter notebook中出现ValueError: signal only works in main thread 报错 即 长时间in[*] 解决办法
-
jupyter notebook打开后新建一个python3之后连接不上网呢或者报错error!解决办法
-
在Jupyter Notebook/Lab中添加R Kernel
-
tensorflow的 jupyter环境 error :UnrecognizedFlagError: Unknown command line flag ‘f‘ 解决办法
-
jupyter notebook中图片显示不出来的解决
-
Jupyter Notebook读入csv文件时出错的解决方案
-
ModuleNotFoundError: No module named ‘pip‘问题的解决方案和jupyter notebook的安装
-
jupyter notebook打开后浏览器无内容解决方案
-
Jupyter Notebook的安装及问题解决方案
-
jupyter notebook无法自动打开浏览器解决方案