im getting this problem where i have installed pytorch following these steps (/@harunijaz/a-step-by-step-guide-to-installing-cuda-with-pytorch-in-conda-on-windows-verifying-via-console-9ba4cd5ccbef) exactly, but i can't get the cuda env to recognise the torch install
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'
>>>
im getting this problem where i have installed pytorch following these steps (https://medium/@harunijaz/a-step-by-step-guide-to-installing-cuda-with-pytorch-in-conda-on-windows-verifying-via-console-9ba4cd5ccbef) exactly, but i can't get the cuda env to recognise the torch install
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'
>>>
Share
Improve this question
edited Mar 27 at 3:27
Derek O
19.7k4 gold badges29 silver badges49 bronze badges
asked Mar 27 at 2:55
sakshisakshi
235 bronze badges
1
|
1 Answer
Reset to default 1Run conda list torch
to see if it's installed. Make sure you run this inside your Conda environment.
If you don't see it run:
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
Change the version depending on your requirements and what your GPU supports. You can find more info here.
conda install pytorch torchvision torchaudio pytorch-cuda -c pytorch -c nvidia
is executed outside the conda environment instead of executing conda install inside the environment (which in your case seems barracuda) – Shuhul Handoo Commented Mar 27 at 2:59