Interrogez-nous, nous vous répondrons !

Pas de module nommé 'torch'

Erreur :

ModuleNotFoundError                       Traceback (most recent call last)
 in 
     14 import matplotlib.pyplot as plt
     15 
---> 16 import torch
     17 import torch.nn as nn
     18 import torch.optim as optim
ModuleNotFoundError: No module named 'torch'

Comment corriger l'erreur ?

pip3 install torch torchvision

Voir aussi : https://pytorch.org/get-started/locally/



Mis à jour: 18.03.2025

Publié: 10.01.2020


Des questions ? Écrivez-nous!

By clicking «I Accept» you confirm that you have read and accepted the website Terms and Conditions, Privacy Policy, and Moneyback Policy.