kernel appeared in jupyter notebook but not working

丶灬走出姿态 提交于 2021-01-29 05:45:25

问题


I am planning to use virtual environment in jupyter notebook through the following steps:

conda create -n test python==3.6
conda activate test
ipython kernel install --user --name=test

Then i get the following in return:

Installed kernelspec test in C:\Users\User\AppData\Roaming\jupyter\kernels\test

which seems to be working when I saw the test kernel appeared in jupyter notebook.

However, when I switch to that kernel, it is actually using my default python enviroment.

I also checked the existing kernels with:

λ jupyter kernelspec list
Available kernels:
  shjh       C:\Users\User\AppData\Roaming\jupyter\kernels\shjh
  test       C:\Users\User\AppData\Roaming\jupyter\kernels\test
  python3    C:\Users\User\Anaconda3\share\jupyter\kernels\python3

It is there but not working ...

Any suggestions how to fix this.


回答1:


Not sure what is causing the problem. But luckily I found a working solution.

First I removed the installed kernel with

jupyter kernelspec uninstall <kernel name>

then added again with ipykernel:

conda create -n test python==3.6
conda activate test
(test) λ pip install ipykernel
(test) λ python -m ipykernel install --name test --display-name "some name"


来源:https://stackoverflow.com/questions/56470407/kernel-appeared-in-jupyter-notebook-but-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!