By default you have installed anaconda and pytorch environments.
1. You must open the Anaconda prompt terminal as an administrator.
2. Enter the pytorch environment:
conda activate pytorch_39
3. Install necessary plug-ins:
(1) conda install nb_conda
(2) conda install ipykernel
4. Enter the following command in the Anaconda prompt to start:
jupyte notebook
In the new file, you can see that the torch-based core can be called.
reference:
[Anaconda has pytorch installed, but jupyter keeps showing No module named 'torch']
https://blog.51cto.com/u_15440206/4666445
[jupyter notebook loads torch and tensorflow in conda virtual environment]
https://blog.csdn.net/duohuanxi/article/details/121635848