第一步:在anaconda的基础环境中安装ipykernel包。
conda install ipykernel
第二步:将指定的虚拟环境添加到jupyter中。
python -m ipykernel install --name YourEnv
其中:YourEnv是自己创建的虚拟环境。
第三步:打开jupyter notebook, 发现可以使用虚拟环境了。
jupyter notebook
参考:
jupyter notebook 修改kernel内核环境_愚天者的博客-CSDN博客_jupyter notebook 修改kernel