1. Create the environment
Create: conda create -n environment name, such as,
conda create -n py39 python=3.9
2. Install ipykernel, otherwise it will be reported that there is no ipykernel
pip install ipykernel
3. Execute configuration
python -m ipykernel install --name py39
There may be an error
Solution
Add –user to the installation command to solve the problem, the command is as follows
python -m ipykernel install --user --name py39
Appendix Common commands
查看所有虚拟环境: conda info -e
启动虚拟环境:activate 环境名
创建:conda create -n 环境名 ,如,conda create -n rcnn python=3.6
删除:conda remove -n rcnn --all