1. Questions
When using Jupyter Notebook to run the code, the default environment is
to click New to see the current environment
In the running interface, click Kernel-Change Kernel to see what
if we want to change the environment? How should it be done?
2. Concrete operation
(1) Open Anaconda Prompt
and activate the environment you want to join (the environment you want to activate in this article is torch-gpu)
conda activate torch-gpu
(2) Install ipykernel
conda install ipykernel
(3) Introduce the local environment into Jupyter (change the two torch-gpu to the environment you want to activate)
python -m ipykernel install --user --name torch-gpu --display-name“Python [conda env:torch-gpu]”
(4) Click New to view.
Click Kernel-Change Kernel on the running interface to view
the change successfully!