jupyter 报错 raise RuntimeError(‘This event loop is already running‘)

Posted _刘文凯_

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jupyter 报错 raise RuntimeError(‘This event loop is already running‘)相关的知识,希望对你有一定的参考价值。

使用anaconda时jupyter报错: raise RuntimeError(‘This event loop is already running’); 这是由于ipykernel冲突导致的

解决办法:
建议在base环境中安装 ipykernel

conda install ipykernel

把报错环境中的ipykernel、jupyter都卸载了

conda activate py37
conda uninstall ipykernel
conda uninstall jupyter
然后安装最新版的
pip install jupyter
pip install ipykernel==5.5.6

在base里启动jupyter

conda activate base
jupyter notebook

在选择kernel的时候选择py37的就行了

以上是关于jupyter 报错 raise RuntimeError(‘This event loop is already running‘)的主要内容,如果未能解决你的问题,请参考以下文章

Python 操作Redis

python爬虫入门----- 阿里巴巴供应商爬虫

Python词典设置默认值小技巧

《python学习手册(第4版)》pdf

Django settings.py 的media路径设置

Python中的赋值,浅拷贝和深拷贝的区别