ImportError: No module named torch.utils.cpp_extension
zhongyingyu opened this issue · comments
zhong commented
i followed the install.md to install dependencies.
when run command "sudo sh build.sh", i got the ImportError :
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
ImportError: No module named torch.utils.cpp_extension
but, i saw there is file''cpp_extension.py" exsist in path "torch/utils/cpp_extension.py "
here is my env:
torch 1.13.1, torchaudio 0.13.1, torchvision 0.14.1
anyone know how to fix this?
cfzd commented
@zhongyingyu
It might be the problem of sudo
. You can simply run sh build.sh
without sudo
. sodu
will ignore your environment and use the system's python, which has no torch
.