threestudio-project/threestudio

ImportError: /home/andy/miniconda3/envs/py310/lib/python3.10/site-packages/tinycudann_bindings/_86_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

andytriboletti opened this issue · 4 comments

I have an issue with running launch.py. Running pip install -r requirements.txt completed successfully. I tried with Python 3.11 and Python 3.10. I had this working before but I tried to install DreamWaltz and Animate124 and the base threestudio install is broken now. I have conda and my environment for this error is py310.

Successfully built nerfacc tinycudann nvdiffrast envlight clip
Installing collected packages: wcwidth, tokenizers, tinycudann, sentencepiece, pytz, pysdf, pydub, ninja, ffmpy, bitsandbytes, appdirs, antlr4-python3-runtime, zipp, xxhash, xmod, xatlas, werkzeug, websockets, websocket-client, vhacdx, urllib3, tzdata, types-python-dateutil, typeguard, triton, trimesh, traitlets, tqdm, toolz, tomlkit, tifffile, tensorboard-data-server, svg.path, soupsieve, sniffio, smmap, six, shellingham, shapely, setproctitle, semantic-version, scipy, safetensors, rtree, rpds-py, regex, readchar, PyYAML, python-multipart, pyparsing, pyjwt, pygments, pydantic-core, psutil, protobuf, packaging, orjson, ordered-set, opencv-python, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, nvdiffrast, multidict, mdurl, markdown, mapbox-earcut, lxml, lazy_loader, kiwisolver, jmespath, itsdangerous, importlib-resources, imageio-ffmpeg, imageio, h11, grpcio, ftfy, fsspec, frozenlist, fonttools, exceptiongroup, embreex, einops, cycler, contourpy, colorlog, colorama, click, chardet, attrs, async-timeout, annotated-types, aiofiles, absl-py, yarl, uvicorn, typer, tensorboard, sentry-sdk, scikit-image, runs, referencing, python-dateutil, PyMCubes, pydantic, omegaconf, nvidia-cusparse-cu12, nvidia-cudnn-cu12, markdown-it-py, lightning-utilities, libigl, jaxtyping, importlib-metadata, httpcore, gitdb, envlight, docker-pycreds, deepdiff, blessed, beautifulsoup4, anyio, aiosignal, starlette, rich, pycollada, pandas, nvidia-cusolver-cu12, matplotlib, jsonschema-specifications, huggingface_hub, httpx, GitPython, editor, dateutils, croniter, botocore, arrow, aiohttp, wandb, transformers, torch, starsessions, s3transfer, jsonschema, inquirer, gradio-client, fastapi, diffusers, xformers, torchmetrics, nerfacc, kornia, boto3, altair, accelerate, timm, pytorch-lightning, lightning-cloud, gradio, clip, taming-transformers-rom1504, lightning, controlnet_aux
  Attempting uninstall: urllib3
    Found existing installation: urllib3 2.2.1
    Uninstalling urllib3-2.2.1:
      Successfully uninstalled urllib3-2.2.1
  Attempting uninstall: triton
    Found existing installation: triton 2.0.0
    Uninstalling triton-2.0.0:
      Successfully uninstalled triton-2.0.0
  Attempting uninstall: torch
    Found existing installation: torch 2.0.1
    Uninstalling torch-2.0.1:
      Successfully uninstalled torch-2.0.1
Successfully installed GitPython-3.1.42 PyMCubes-0.1.4 PyYAML-6.0.1 absl-py-2.1.0 accelerate-0.27.2 aiofiles-23.2.1 aiohttp-3.9.3 aiosignal-1.3.1 altair-5.2.0 annotated-types-0.6.0 antlr4-python3-runtime-4.9.3 anyio-4.3.0 appdirs-1.4.4 arrow-1.3.0 async-timeout-4.0.3 attrs-23.2.0 beautifulsoup4-4.12.3 bitsandbytes-0.38.1 blessed-1.20.0 boto3-1.34.50 botocore-1.34.50 chardet-5.2.0 click-8.1.7 clip-1.0 colorama-0.4.6 colorlog-6.8.2 contourpy-1.2.0 controlnet_aux-0.0.7 croniter-1.3.15 cycler-0.12.1 dateutils-0.6.12 deepdiff-6.7.1 diffusers-0.19.3 docker-pycreds-0.4.0 editor-1.6.6 einops-0.7.0 embreex-2.17.7.post4 envlight-0.1.0 exceptiongroup-1.2.0 fastapi-0.1.17 ffmpy-0.3.2 fonttools-4.49.0 frozenlist-1.4.1 fsspec-2023.12.2 ftfy-6.1.3 gitdb-4.0.11 gradio-4.11.0 gradio-client-0.7.3 grpcio-1.62.0 h11-0.14.0 httpcore-1.0.4 httpx-0.27.0 huggingface_hub-0.20.3 imageio-2.34.0 imageio-ffmpeg-0.4.9 importlib-metadata-7.0.1 importlib-resources-6.1.2 inquirer-3.2.4 itsdangerous-2.1.2 jaxtyping-0.2.25 jmespath-1.0.1 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 kiwisolver-1.4.5 kornia-0.7.1 lazy_loader-0.3 libigl-2.5.0 lightning-2.0.0 lightning-cloud-0.5.64 lightning-utilities-0.10.1 lxml-5.1.0 mapbox-earcut-1.0.1 markdown-3.5.2 markdown-it-py-3.0.0 matplotlib-3.8.3 mdurl-0.1.2 multidict-6.0.5 nerfacc-0.5.2 ninja-1.11.1.1 nvdiffrast-0.3.1 nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.19.3 nvidia-nvjitlink-cu12-12.3.101 nvidia-nvtx-cu12-12.1.105 omegaconf-2.3.0 opencv-python-4.9.0.80 ordered-set-4.1.0 orjson-3.9.15 packaging-23.2 pandas-2.2.1 protobuf-4.25.3 psutil-5.9.8 pycollada-0.8 pydantic-2.6.2 pydantic-core-2.16.3 pydub-0.25.1 pygments-2.17.2 pyjwt-2.8.0 pyparsing-3.1.1 pysdf-0.1.9 python-dateutil-2.8.2 python-multipart-0.0.9 pytorch-lightning-2.2.0.post0 pytz-2024.1 readchar-4.0.5 referencing-0.33.0 regex-2023.12.25 rich-13.7.0 rpds-py-0.18.0 rtree-1.2.0 runs-1.2.2 s3transfer-0.10.0 safetensors-0.4.2 scikit-image-0.22.0 scipy-1.12.0 semantic-version-2.10.0 sentencepiece-0.2.0 sentry-sdk-1.40.5 setproctitle-1.3.3 shapely-2.0.3 shellingham-1.5.4 six-1.16.0 smmap-5.0.1 sniffio-1.3.1 soupsieve-2.5 starlette-0.37.1 starsessions-1.3.0 svg.path-6.3 taming-transformers-rom1504-0.0.6 tensorboard-2.16.2 tensorboard-data-server-0.7.2 tifffile-2024.2.12 timm-0.9.16 tinycudann-1.7 tokenizers-0.13.3 tomlkit-0.12.0 toolz-0.12.1 torch-2.2.0 torchmetrics-1.3.1 tqdm-4.66.2 traitlets-5.14.1 transformers-4.28.1 trimesh-4.1.6 triton-2.2.0 typeguard-2.13.3 typer-0.9.0 types-python-dateutil-2.8.19.20240106 tzdata-2024.1 urllib3-2.0.7 uvicorn-0.27.1 vhacdx-0.0.5 wandb-0.16.3 wcwidth-0.2.13 websocket-client-1.7.0 websockets-11.0.3 werkzeug-3.0.1 xatlas-0.0.9 xformers-0.0.24 xmod-1.8.1 xxhash-3.4.1 yarl-1.9.4 zipp-3.17.0
(py310) andy@andys-pc:~/threestudio$ python launch.py --config configs/dreamfusion-if.yaml --train --gpu 0 system.prompt_processor.prompt="a zoomed out DSLR photo of a baby bunny sitting on top of a stack of pancakes"
/home/andy/miniconda3/envs/py310/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/home/andy/miniconda3/envs/py310/lib/python3.10/site-packages/torchvision/image.so: undefined symbol: _ZN3c1017RegisterOperatorsD1Ev'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
  warn(
Traceback (most recent call last):
  File "/home/andy/threestudio/launch.py", line 301, in <module>
    main(args, extras)
  File "/home/andy/threestudio/launch.py", line 135, in main
    import threestudio
  File "/home/andy/threestudio/threestudio/__init__.py", line 55, in <module>
    from . import data, models, systems
  File "/home/andy/threestudio/threestudio/data/__init__.py", line 1, in <module>
    from . import co3d, image, multiview, uncond
  File "/home/andy/threestudio/threestudio/data/co3d.py", line 17, in <module>
    from threestudio.data.uncond import (
  File "/home/andy/threestudio/threestudio/data/uncond.py", line 14, in <module>
    from threestudio.utils.base import Updateable
  File "/home/andy/threestudio/threestudio/utils/__init__.py", line 1, in <module>
    from . import base
  File "/home/andy/threestudio/threestudio/utils/base.py", line 7, in <module>
    from threestudio.utils.misc import get_device, load_module_weights
  File "/home/andy/threestudio/threestudio/utils/misc.py", line 6, in <module>
    import tinycudann as tcnn
  File "/home/andy/miniconda3/envs/py310/lib/python3.10/site-packages/tinycudann/__init__.py", line 9, in <module>
    from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
  File "/home/andy/miniconda3/envs/py310/lib/python3.10/site-packages/tinycudann/modules.py", line 51, in <module>
    _C = importlib.import_module(f"tinycudann_bindings._{cc}_C")
  File "/home/andy/miniconda3/envs/py310/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/andy/miniconda3/envs/py310/lib/python3.10/site-packages/tinycudann_bindings/_86_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

Using gcc and g++ version 10 fixed this problem. I had been using version 11.

@andytriboletti I tried to follow this https://askubuntu.com/questions/1192955/how-to-install-g-10-on-ubuntu-18-04
with no success.

Both gcc and g++ are v10

dreamer@99dc0be1ca96:~/threestudio$ gcc --version
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

How did you manage to get it to run?

(I am using Docker btw)

Try reinstalling the TinyCudaNN torch bindings using python setup.py install in bindings/torch. See vllm-project/vllm#2804 (comment)