CityGaussian icon indicating copy to clipboard operation
CityGaussian copied to clipboard

Undefined Symbol Problems when running the .sh commands

Open ZhenyuSun-Walker opened this issue 1 year ago • 3 comments

Hello, sir, I wonder how to deal with the problems below when I perform the commandbash scripts/run_citygs.sh:

GPU  is available.
Traceback (most recent call last):
  File "/home/szy/Projects/CityGaussian/train_large.py", line 18, in <module>
    from gaussian_renderer import render, render_large, network_gui
  File "/home/szy/Projects/CityGaussian/gaussian_renderer/__init__.py", line 14, in <module>
    from diff_gaussian_rasterization import GaussianRasterizationSettings, GaussianRasterizer
  File "/home/szy/anaconda3/envs/citygs/lib/python3.9/site-packages/diff_gaussian_rasterization/__init__.py", line 15, in <module>
    from . import _C
ImportError: /home/szy/anaconda3/envs/citygs/lib/python3.9/site-packages/diff_gaussian_rasterization/_C.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1017SymbolicShapeMeta18init_is_contiguousEv
GPU  is available.
Traceback (most recent call last):
  File "/home/szy/Projects/CityGaussian/data_partition.py", line 13, in <module>
    from gaussian_renderer import render
  File "/home/szy/Projects/CityGaussian/gaussian_renderer/__init__.py", line 14, in <module>
    from diff_gaussian_rasterization import GaussianRasterizationSettings, GaussianRasterizer
  File "/home/szy/anaconda3/envs/citygs/lib/python3.9/site-packages/diff_gaussian_rasterization/__init__.py", line 15, in <module>
    from . import _C
ImportError: /home/szy/anaconda3/envs/citygs/lib/python3.9/site-packages/diff_gaussian_rasterization/_C.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1017SymbolicShapeMeta18init_is_contiguousEv
No GPU available at the moment. Retrying in 2 minute.
No GPU available at the moment. Retrying in 2 minute.

I have succeeded in setting up the required environments, and specificly with Pytorch=2.0.1 / CUDA=11.8. I wonder if it matters with the possible conflicts between certain version of torch and cuda.

BTW, I've also tried the installation as Pytorch=2.5.1 / CUDA=12.4, but I find myself still stuck in the same problem.

Anticipating for your earliest reply!

ZhenyuSun-Walker avatar Jan 03 '25 09:01 ZhenyuSun-Walker

I am using uv to manage environment, this will create a python venv with Python 3.12 / Pytorch=2.5.1 / CUDA=12.4, test on the ubuntu 22.04 with 4090 / A100 and citygs have no problem running in this venv.

wget -qO- https://astral.sh/uv/install.sh | sh
cd CityGaussian
uv init
uv venv --python 3.12
source .venv/bin/activate
uv add torch torchvision torchaudio
(optional)export CUDA_HOME=/usr/local/cuda
uv add -r requirements.txt --no-build-isolation

You can also add pypi mirror server to pyproject.toml like aliyun to speed up package download.

[[tool.uv.index]]
url = "http://mirrors.aliyun.com/pypi/simple"
default = true

Fregettia avatar Jan 05 '25 09:01 Fregettia

Hi, @Fregettia, this seems to be the problem in installing diff_gaussian_rasterization. This issue might be helpful.

DekuLiuTesla avatar Jan 06 '25 05:01 DekuLiuTesla

Thank you for your advice! I‘ve solved this problem, by installing the diff_gaussian_rasterization and simple-knn in CityGS, as well as installing the compressed_diff_gaussian_rasterization in LargeLightGaussian.

ZhenyuSun-Walker avatar Jan 06 '25 06:01 ZhenyuSun-Walker