1. 在base环境中安装jupyter notebook
(base) wangyue@LAPTOP-FMOR2BIN:~$ conda install jupyter notebook
2. 在base环境中安装ipykernel
(base) wangyue@LAPTOP-FMOR2BIN:~$ conda install ipykernel
3. 在目标环境中安装ipykernel
(base) wangyue@LAPTOP-FMOR2BIN:~$ conda activate scanpy
(scanpy) wangyue@LAPTOP-FMOR2BIN:~$ conda install ipykernel
4. 在base环境中将目标环境写入notebook的kernel中,打开jupyter notebook。
(scanpy) wangyue@LAPTOP-FMOR2BIN:~$ conda activate base
(base) wangyue@LAPTOP-FMOR2BIN:~$ python -m ipykernel install --user --name scanpy --display-name “python scanpy”
(base) wangyue@LAPTOP-FMOR2BIN:~$ jupyter notebook
(base) wangyue@LAPTOP-FMOR2BIN:~$ conda install nb_conda_kernels
Kernel中出现了名字为python scanpy的Kernel