pytorch runs in anaconda prompt but not in python idle
I know this question might be stupid, but I couldn't find any help on the internet. Recently I installed anaconda in my computer, it runs Windows 10 x64. Then I used anaconda prompt to download and install pytorch for 3.6 python:

conda install pytorch torchvision cuda100 -c pytorch


After the installation I verified in anaconda's prompt that pytorch is installed:

&gt;&gt;&gt; Python
&gt;&gt;&gt; Import torch
&gt;&gt;&gt; torch.cuda.is_available()
True


I also checked conda list and indeed pytorch is installed in my machine.
However, I write Python code in python 3.6.7 IDLE, not in anaconda prompt, so, whenever I try to import pytorch I get the message:

Traceback (most recent call last):
File "&lt;pyshell#0&gt;", line 1, in &lt;module&gt;
import pytorch
ModuleNotFoundError: No module named 'pytorch'


For some reason, Anacoda prompt recognizes pytorch, but not IDLE. Is there any solution for this? Is there any way to import pytorch module to IDLE?
Thanks in advance.

It seems like the python used by idle is not the one from anaconda. In python it's very common to have multiple environments, and you always need to be aware of which environment is activated. To see what environment is activated, you can do something in this in anaconda and idle

&gt;&gt;&gt; import sys
&gt;&gt;&gt; print(sys.executable)


If they have different paths, you need to first figure out how to stay in a specific environment in idle.
