How to import torch in pycharm

I have installed torch successfully in my system and it works great.
I recently installed pycharm, and for some reason i dont know why i cannot find torch there.
Can anyone help how i can fix this issue

Can you check to make sure that you have the correct python interpreter selected in pycharm? If you used conda, you’d have to select the one that’s in your conda env.

I imported it from conda and now it sounds like working

I have the same problem. I’ve correctly installed pytorch. I’ve verified the installation at the command prompt. But when I try to “import torch”, I get an error message “no module named torch”…

Thank you for any help. It’s much appreciated.


torchvision is correctly installed but not torch???

1 Like