facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

Unable to import a function from ops #1637

Open Hmz30265 opened 1 year ago

Hmz30265 commented 1 year ago

Hello, thanks for this amazing github repo.

I am currently trying to use a function called: box3d_overlap from pytorch3d packages. But when I try to run this code:

File "/Users/matthewhe/mAP/try_pytorch3d.py", line 4, in from pytorch3d.ops import box3d_overlap ModuleNotFoundError: No module named 'pytorch3d.ops'; 'pytorch3d' is not a package

Could you please tell me how to fix this issue? Thank you!

bottler commented 1 year ago

I think something might be wrong with paths. Could have a directory called pytorch3d somewhere on your PYTHONPATH or in your working directory which isn't the pytorch3d install? (e.g. containing the github checkout of pytorch3d)? Try navigating to a new directory and starting python there; can you then do import pytorch3d or from pytorch3d.ops import box3d_overlap?