@smth Thanks. I installed pytorch from source following those instructions.
I created a new conda environment and tried to import torch and got a module not found error. Importing works on the “base” environment though. I’m guessing this is some path issue. Any suggestions for a fix?
Currently, the pytorch directory is located at ~/anaconda3/pytorch. As I mentioned earlier, in the base environment I am able to import torch. I a new conda environment, I added the pytorch path

import sys; sys.path.append(’/home/username/anaoncda3/pytorch’)

However, when I import torch now, I get the following error:

Traceback (most recent call last):
File “”, line 1, in 
File “/home/username/anaconda3/pytorch/torch/init.py”, line 77, in 
from torch._C import *
ModuleNotFoundError: No module named ‘torch._C’

I made sure that I’m not in the pytorch source directory as this seemed to be a problem (as per here 7). Still no success.