仅作为记录,大佬请跳过。
背景
博主在base环境中(linux服务器),能够使用jupyter notebook(具体操作可参考博主文章:传送门)
然后,博主创建了一个python虚拟环境
在xshell中输入conda create -n envjupyter python=3.7 -y
,然后输入conda activate envjupyter
进入虚拟环境,这时使用jupyter notebook命令时,显示jupyter: command not found
博主以为需要在虚拟环境中安装jupyter notebook,其实不用,只需conda install内核jupyter部件即可。
解决
在xshell中输入:
conda install nb_conda
conda install -n envjupyter ipykernel
(这里的envjupyter是博主起的虚拟环境的名字,需要修改成自己的虚拟环境名字)
此时再次运行:
jupyter notebook
,发现可行
参考
感谢大佬博主文章:传送门