torch virtual env not working python 3.7 , what am i doing wrong?
so i installed pytorch using conda into a virtual env while referring to this video
https://www.youtube.com/watch?v=vBfM5l9VK5c
i have activated the env
now inside jupyter notebook i run
import torch
print(torch.__version__)


and it works but when ever i run this in .py file and run it through terminal it gives me this error
import torch
ModuleNotFoundError: No module named 'torch'

if I try to pip install pytorch it says
 Requirement already satisfied: torchvision in c:\users\kiit\anaconda3\envs\torch\lib\site-packages (0.10.0)
Requirement already satisfied: numpy in c:\users\kiit\anaconda3\envs\torch\lib\site-packages (from torchvision) (1.20.3)
Requirement already satisfied: torch==1.9.0 in c:\users\kiit\anaconda3\envs\torch\lib\site-packages (from torchvision) (1.9.0)
Requirement already satisfied: pillow&gt;=5.3.0 in c:\users\kiit\anaconda3\envs\torch\lib\site-packages (from torchvision) (8.2.0)
Requirement already satisfied: typing_extensions in c:\users\kiit\anaconda3\envs\torch\lib\site-packages (from torch==1.9.0-&gt;torchvision) (3.7.4.3)


so what is going on exactly??

You might have more than one python versions installed on your system i.e One with conda and one separately.
In order to check that, you can go to control panel --&gt; Programs and features. There you can figure out how many python installations are present on your system. Delete the one you dont need and your problem will be resolved.
