首先需要先conda create创建自己的虚拟环境
接下来打开 Anaconda prompt
激活创建的虚拟环境(我创建的虚拟环境是 F:\conda_environment\pytorch)
然后在虚拟环境中安装ipykernel
输入:conda install ipykernel
之后再继续安装nb_conda
输入: conda install -c conda-forge nb_conda
这样就安装好了,然后就直接输入:jupyter notebook
即可打开网页进入jupyter notebook如下图:
再右上角的New中就可以选择刚创建好的虚拟环境,然后点击就可以进入到所配置的虚拟环境的jupyter notebook中去了
简单验证一下我的pytorch是否安装成功
在使用jupyter notebook时不能将前面打开的Anaconda prompt关闭,否则会断开连接
退出jupyter notebook时,将jupyter notebook页面关掉,然后在Anaconda prompt按下快捷键Ctrl
+C,即可返回到命令行的形式