ModuleNotFoundError: No module named 'caffe2'

1.7k Views Asked by At

I have successfully installed pytorch from source using command git clone --recursive https://github.com/pytorch/pytorch.git on my Windows 11 with CPU. But I cannot run the pretrained DL model. It gives error on line: from caffe2.python import workspace. Even though I have workspace on pytorch/caffe2/python/workspace. Please guide if there is anything else I need to do?

1

There are 1 best solutions below

1
Deepali Chourasia On

Please enable BUILD_CAFFE2 while building PyTorch from source if not already done.