jupyter notebook中只有python2没有python3怎么办?
没有python3的原因是jupyter notebook必须you内核 !!!
- 查看jupyter notebook kernel:
jupyter kernelspec list
删除notebook kernel:
jupyter kernelspec remove kernelname
确保python3环境下安装了ipykernel:
pip3 install ipykernel
查看python3路径:
which python3
如果没有的话就安装python3:
sudo apt-get install python3-pip
升级:
sudo pip3 install --upgrade pip
然后输入命令:
pip3 install ipykernel
python3 -m ipykernel install
启动jupyter notebook:
jupyter notebook
现在jupyter notebook中就出现了python3。
完成!!!!!