美文网首页
jupyter notebook不能更换kernel

jupyter notebook不能更换kernel

作者: 云彩修建站站长 | 来源:发表于2020-04-27 16:59 被阅读0次

今天使用conda创建了一个纯净的虚拟环境,在这环境里面装了一些包。
然后我在这个环境下想使用jupyter notebook,但是发现jupyter notebook使用的还是base环境里的python。
我使用的是win,所以我看了下python命令的路径:

(rasa) D:\exec\rasa\rasa\Scripts>where python
D:\exec\rasa\rasa\Scripts\python.exe
C:\ProgramData\Anaconda3\python.exe

可以看到python在两个路径中,我们运行python会执行虚拟环境的中python。

(rasa) D:\exec\rasa\rasa\Scripts>where jupyter
C:\ProgramData\Anaconda3\Scripts\jupyter.exe

在看jupyter,它只存在base环境中,所以会打开base环境中的jupyter,而它的默认kernel就是base的kernel。

如果想更换kernel,就需要安装nb_conda_kernels了,安装之后就好了。

相关文章

网友评论

      本文标题:jupyter notebook不能更换kernel

      本文链接:https://www.haomeiwen.com/subject/kykuwhtx.html