我们可以在不同的pytorch环境下分别安装jupyter notebook,当然也可以在jupyter 中添加对应的pytorch环境,然后在网页自由也换版本,看下第二种。
安装ipykernel,将环境添加到Jyputer中
1.切换至你的虚拟环境: activate py36 (py36是我的虚拟环境名称)
2.pip install ipykernel 安装必要插件
3.python -m ipykernel install --name py36 将环境添加到Jyputer中
在Jupyter Notebook中删除虚拟环境
jupyter kernelspec remove pyenv37