在Jupyter notebook中切换python kernel后使用的仍是切换前的python问题

博主原本只安装了python2的jupyter notebook,后来因需要用pip3 install jupyter notebook安装了python3的jupyter notebook之后,用jupyter notebook命令打开jupyter notebook后界面的kernel选项已经显示可以Change kernel,但切换为python3的kernel后,通过

import sys
sys.path

查看显示的python环境变量仍是python2的,上网搜了一通才知道在jupyter中使用不同kernel需要自己手动新建,为防遗忘做点记录,下面是官网的操作说明及截图。
kernels for python2 and python3
这里写图片描述

参考资料:
https://blog.csdn.net/silence2015/article/details/73650665

发布了92 篇原创文章 · 获赞 127 · 访问量 23万+

猜你喜欢

转载自blog.csdn.net/Blateyang/article/details/80696423
今日推荐