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

can't install in colab #1799

Closed xuncpp closed 4 months ago

xuncpp commented 4 months ago

I used method in install.md:

import sys
import torch
pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
version_str="".join([
    f"py3{sys.version_info.minor}_cu",
    torch.version.cuda.replace(".",""),
    f"_pyt{pyt_version_str}"
])
!pip install fvcore iopath
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html

It worked well before,but did't work today. I print version_str is py310_cu121_pyt230. I think pyt230 is not match. I also can install successfully by py310_cu121_pyt212,but in this case, the program cannot run.

from pytorch3d import _C
ImportError: /usr/local/lib/python3.10/dist-packages/pytorch3d/_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops10zeros_like4callERKNS_6TensorEN3c108optionalINS5_10ScalarTypeEEENS6_INS5_6LayoutEEENS6_INS5_6DeviceEEENS6_IbEENS6_INS5_12MemoryFormatEEE

Can anyone help me solve this problem? Thank you very much!

bottler commented 4 months ago

I think this happened because colab updated to PyTorch 2.3.0 for which we didn't have a build. I have just added a build for that version_str so it should now work.

xuncpp commented 4 months ago

The problem is solved! Thank you very much for your prompt reply! !

JPPPPPF commented 1 month ago

Hello @bottler , this issue is back on google colab, what can I do please to fix it? Thank you! Also is there a way for me to find all the available builds that we can use from?

bottler commented 1 month ago

@JPPPPPF What's the actual version string colab wants?

JPPPPPF commented 1 month ago

@bottler same as the above