ModuleNotFoundError: No module named 'torchvision' error handling

In the neural network, the error No module named 'torchvision' appears when importing torchvision.

First, check whether torch is installed successfully and enter the code. If version information appears, it means the installation has been successful.

import torch
print(torch.__version__)

Secondly, install torchvision, open the jupyter terminal, find the folder in the [Start Menu], and click the drop-down file prompt to open the terminal.

Finally enter the code conda install torchvision

Proceed ([y]/n)? appears  , enter y, press Enter, and the installation is completed.

Guess you like

Origin blog.csdn.net/Tangiiiiii/article/details/132861584