Since there’re so many Python distributions installed, I wonder whether these environments are messed up. Does pip and python come from the same Python distribution? You can check this through the following commands.
where python.exe
where pip.exe

As for IDLE, make sure you set it to the Python distribution that has PyTorch in it.