facebookresearch / pytorch3d

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

Error 'pytorch3d' has no attribute 'ops' #1590

Closed ardianumam closed 12 months ago

ardianumam commented 1 year ago

Hi,

I install pytorch3d on Ubuntu 20.04 machine via pip install pytorch3d, with CPU only and Python 3.9.15. The installation is successful. However, when I call pytorch3d.ops.sample_farthest_points, it gets me error Error 'pytorch3d' has no attribute 'ops'. Is the any direction to solve this?

Thanks, Ardian

bottler commented 1 year ago

pip install pytorch3d is not a valid command to install pytorch3d on Linux. Please follow the instructions in INSTALL.md.

whao22 commented 12 months ago

Hi,

I install pytorch3d on Ubuntu 20.04 machine via pip install pytorch3d, with CPU only and Python 3.9.15. The installation is successful. However, when I call pytorch3d.ops.sample_farthest_points, it gets me error Error 'pytorch3d' has no attribute 'ops'. Is the any direction to solve this?

Thanks, Ardian

I had the same problem, and i find the following code is useful.

import pytorch3d.ops as ops
ops.sample_farthest_points()