facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Other
9.5k stars 1.44k forks source link

Google Colab demo not working: Could not find name `_C` in `pytorch3d`. #92

Closed orioljc closed 3 years ago

orioljc commented 3 years ago

I am running the sample code on GOogle Colab without any modfications but I get the following error when trying to run from lib.colab_util import generate_video_from_obj, set_renderer, video:

ImportError Traceback (most recent call last)

in () ----> 1 from lib.colab_util import generate_video_from_obj, set_renderer, video 2 3 renderer = set_renderer() 4 generate_video_from_obj(obj_path, out_img_path, video_path, renderer) 5 4 frames /usr/local/lib/python3.6/dist-packages/pytorch3d/renderer/blending.py in () 7 8 # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`. ----> 9 from pytorch3d import _C 10 11 ImportError: /usr/local/lib/python3.6/dist-packages/pytorch3d/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl23ExcludeDispatchKeyGuardC1ENS_11DispatchKeyE Why is this happening? How can I solve it? I guess all Colab users should be getting the same issue... Thanks
ultrafez commented 3 years ago

I've had the same issue - exact same stack trace and error message.

It's been a while since I've used Python in anger, but pytorch3d version 0.3.0 was released 9 days ago, so I tried forcing it to install the previous version with !pip install 'pytorch3d=0.2.5' but that didn't help - same error.

rbritten commented 3 years ago

Fix is here: https://github.com/facebookresearch/pifuhd/issues/77#issuecomment-725247401