pytorch3d
pytorch3d copied to clipboard
import error : from pytorch3d import _C
Traceback (most recent call last):
File "inference.py", line 9, in
This is usually due to a mismatch in the version of pytorch which pytorch3d was built with and the version of pytorch which you have at runtime. How did you install pytorch and how did you install pytorch3d?
This is usually due to a mismatch in the version of pytorch which pytorch3d was built with and the version of pytorch which you have at runtime. How did you install pytorch and how did you install pytorch3d?
I have the same error.And I install pytorch by conda install pytorch==1.8.0, and install pytorch3d by conda install pytorch3d
This is usually due to a mismatch in the version of pytorch which pytorch3d was built with and the version of pytorch which you have at runtime. How did you install pytorch and how did you install pytorch3d?
I have the same error.And I install pytorch by
conda install pytorch==1.8.0, and install pytorch3d byconda install pytorch3d
I just solve the error, I just use pip uninstall torch, and find that the pytorch 1.12.1 is uninstalled. But when I use conda list and find this

However, I just uninstall the torch, then there is no error when I import pytorch3d. But I don't know why, maybe someone can explain it?
Having pytorch3d will let you import pytorch3d. The mismatch error will only show up if you import or use certain things. Possibly import pytorch3d.structures is enough.
I met the same problem when installing pytorch3d using conda. Just install the package from the source.
pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"