ModuleNotFoundError: No module named 'torch'

OK, there are no packages in the environment pytorch. Maybe, this environment is broken. You should create an environment after removing the broken environment.

conda remove -n pytorch --all
conda create -n pytorch
conda install -n pytorch pytorch torchvision cudatoolkit=9.0 -c pytorch

The error i got when i run “conda remove -n pytorch --all” command
(base) C:\Users\Vineeth>conda remove -n pytorch --all

Remove all packages in environment C:\Users\Vineeth\Anaconda3\envs\pytorch:

PackagesNotFoundError: The following packages are missing from the target environment:

same error when i run the 3 steps

Please try another environment name (e.g. pytorch-1.0):

conda create -n pytorch-1.0
conda install -n pytorch-1.0 pytorch torchvision cudatoolkit=9.0 -c pytorch
1 Like

i have created pytorch1.0 environment then activated the pytorch1.0 ,while installing the same error is coming as before

You should report this bug on Conda GitHub site.

Thank you very much. Worked for me!