1. Create a new virtual environment
#env_name使你的环境名字,选择一下python版本
conda create -n env_name python=X.X
2. View the virtual environment
conda info -e
3. Install ipykernel in the base environment
pip install ipykernel
4. Activate the virtual environment
conda activate env_name
5. Install ipykernel
6. Enter the virtual environment directory (very important! Otherwise, the addition may be unsuccessful)
7. Then add the kernel
python -m ipykernel install --user --name env_name --display-name kernelname
#kernelname是你的内核名
Attached:
View kernel
jupyter kernelspec list
Remove kernel
jupyter kernelspec remove kernelname