復現論文報錯解決

文章目錄

  • 一、 The detected CUDA version (12.9) mismatches the version that was used to compile PyTorch (11.8)
  • 二、error -- unsupported GNU version! gcc versions later than 11 are not supported!
  • 三、Unknown encoder 'libx264'
  • 四、下載速度太慢、無法遞歸下載項目


一、 The detected CUDA version (12.9) mismatches the version that was used to compile PyTorch (11.8)

在運行pip install -e gaussian-splatting/submodules/diff-gaussian-rasterization/ 的時候報錯
報錯內容(部分):

RuntimeError:
The detected CUDA version (12.9) mismatches the version that was used to compile PyTorch (11.8). 
Please make sure to use the same CUDA versions.

報錯內容(全部):

pip install -e gaussian-splatting/submodules/diff-gaussian-rasterization/
Obtaining file:///mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterizationPreparing metadata (setup.py) ... done
Installing collected packages: diff-gaussian-rasterizationDEPRECATION: Legacy editable install of diff-gaussian-rasterization==0.0.0 from file:///mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterization (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457Running setup.py develop for diff-gaussian-rasterizationerror: subprocess-exited-with-error× python setup.py develop did not run successfully.exit code: 1╰─> [76 lines of output]running develop/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.!!********************************************************************************Please avoid running ``setup.py`` and ``easy_install``.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://github.com/pypa/setuptools/issues/917 for details.********************************************************************************!!easy_install.initialize_options(self)/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.!!********************************************************************************Please avoid running ``setup.py`` directly.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.********************************************************************************!!self.initialize_options()running egg_infowriting diff_gaussian_rasterization.egg-info/PKG-INFOwriting dependency_links to diff_gaussian_rasterization.egg-info/dependency_links.txtwriting top-level names to diff_gaussian_rasterization.egg-info/top_level.txt/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.warnings.warn(msg.format('we could not find ninja.'))reading manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'adding license file 'LICENSE.md'writing manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'running build_extTraceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 35, in <module>File "/mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterization/setup.py", line 17, in <module>setup(File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setupreturn distutils.core.setup(**attrs)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setupreturn run_commands(dist)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commandsdist.run_commands()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commandsself.run_command(cmd)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_commandsuper().run_command(command)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_commandcmd_obj.run()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in runself.install_for_development()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py", line 111, in install_for_developmentself.run_command('build_ext')File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_commandself.distribution.run_command(command)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_commandsuper().run_command(command)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_commandcmd_obj.run()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run_build_ext.run(self)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in runself.build_extensions()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions_check_cuda_version(compiler_name, compiler_version)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 387, in _check_cuda_versionraise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))RuntimeError:The detected CUDA version (12.9) mismatches the version that was used to compilePyTorch (11.8). Please make sure to use the same CUDA versions.[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error× python setup.py develop did not run successfully.exit code: 1
╰─> [76 lines of output]running develop/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.!!********************************************************************************Please avoid running ``setup.py`` and ``easy_install``.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://github.com/pypa/setuptools/issues/917 for details.********************************************************************************!!easy_install.initialize_options(self)/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.!!********************************************************************************Please avoid running ``setup.py`` directly.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.********************************************************************************!!self.initialize_options()running egg_infowriting diff_gaussian_rasterization.egg-info/PKG-INFOwriting dependency_links to diff_gaussian_rasterization.egg-info/dependency_links.txtwriting top-level names to diff_gaussian_rasterization.egg-info/top_level.txt/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.warnings.warn(msg.format('we could not find ninja.'))reading manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'adding license file 'LICENSE.md'writing manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'running build_extTraceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 35, in <module>File "/mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterization/setup.py", line 17, in <module>setup(File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setupreturn distutils.core.setup(**attrs)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setupreturn run_commands(dist)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commandsdist.run_commands()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commandsself.run_command(cmd)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_commandsuper().run_command(command)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_commandcmd_obj.run()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in runself.install_for_development()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py", line 111, in install_for_developmentself.run_command('build_ext')File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_commandself.distribution.run_command(command)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_commandsuper().run_command(command)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_commandcmd_obj.run()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run_build_ext.run(self)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in runself.build_extensions()File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions_check_cuda_version(compiler_name, compiler_version)File "/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 387, in _check_cuda_versionraise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))RuntimeError:The detected CUDA version (12.9) mismatches the version that was used to compilePyTorch (11.8). Please make sure to use the same CUDA versions.[end of output]

排查錯因
(1)想通過輸入which nvcc的方式來查詢當前cuda的路徑,結果沒有輸出任何內容。
(2)想通過輸入nvcc -V的方式查看cuda版本,結果輸出是:

nvcc -V
Command 'nvcc' not found, but can be installed with:
apt install nvidia-cuda-toolkit
Please ask your administrator.

(3)輸入ls /usr/local | grep cuda,想要查看系統中是否有 CUDA 相關文件,輸出結果為:

cuda
cuda-12
cuda-12.9

并沒有預期的cuda 11.8。GPT說若輸出類似cuda或cuda-11.8,說明 CUDA 已安裝但未配置環境變量。若沒有輸出,說明 CUDA 未安裝。
需要安裝CUDA。

解決方案
去官網找CUDA 11.8 安裝包:https://developer.nvidia.com/cuda-toolkit-archive
在這里插入圖片描述
運行命令:
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
隨后為安裝程序添加執行權限。但因為我沒有管理員權限,所以選擇使用 --silent 靜默安裝,并指定 --toolkit 只安裝工具鏈。

# 為安裝程序添加執行權限
chmod +x cuda_11.8.0_520.61.05_linux.run# 使用 --silent 靜默安裝,并指定 --toolkit 只安裝工具鏈
./cuda_11.8.0_520.61.05_linux.run \--silent \--toolkit \--toolkitpath=$HOME/cuda-11.8 \--override

然后配置環境變量,這里有兩種配置方式,一種是暫時的,一種是永久的。推薦使用永久的。
永久的:

echo 'export PATH=$HOME/cuda-11.8/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$HOME/cuda-11.8/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc

暫時的(只在當前終端有效):

export PATH=$HOME/cuda-11.8/bin:$PATH
export LD_LIBRARY_PATH=$HOME/cuda-11.8/lib64:$LD_LIBRARY_PATH

配置完成后再輸入nvcc -V,就能看到版本信息了(cuda 11.8)。因此推測一開始檢測到的CUDA version (12.9)是系統的cuda版本,不是當前環境中的,因此造成了沖突。此時,運行pip install -e gaussian-splatting/submodules/diff-gaussian-rasterization/也不會再報同樣的錯誤。

二、error – unsupported GNU version! gcc versions later than 11 are not supported!

運行pip install -e gaussian-splatting/submodules/diff-gaussian-rasterization/的時候出現以下報錯:

pip install -e gaussian-splatting/submodules/diff-gaussian-rasterization/
Obtaining file:///mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterizationPreparing metadata (setup.py) ... done
Installing collected packages: diff-gaussian-rasterizationDEPRECATION: Legacy editable install of diff-gaussian-rasterization==0.0.0 from file:///mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterization (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457Running setup.py develop for diff-gaussian-rasterizationerror: subprocess-exited-with-error× python setup.py develop did not run successfully.│ exit code: 1╰─> [47 lines of output]running develop/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.!!********************************************************************************Please avoid running ``setup.py`` and ``easy_install``.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://github.com/pypa/setuptools/issues/917 for details.********************************************************************************!!easy_install.initialize_options(self)/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.!!********************************************************************************Please avoid running ``setup.py`` directly.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.********************************************************************************!!self.initialize_options()running egg_infowriting diff_gaussian_rasterization.egg-info/PKG-INFOwriting dependency_links to diff_gaussian_rasterization.egg-info/dependency_links.txtwriting top-level names to diff_gaussian_rasterization.egg-info/top_level.txt/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.warnings.warn(msg.format('we could not find ninja.'))reading manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'adding license file 'LICENSE.md'writing manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'running build_ext/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no g++ version bounds defined for CUDA version 11.8warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')building 'diff_gaussian_rasterization._C' extension/mnt/disk2/zijie.zheng/cuda-11.8/bin/nvcc -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include/TH -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include/THC -I/mnt/disk2/zijie.zheng/cuda-11.8/include -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/include/python3.9 -c cuda_rasterizer/backward.cu -o build/temp.linux-x86_64-cpython-39/cuda_rasterizer/backward.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -I/mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17In file included from /mnt/disk2/zijie.zheng/cuda-11.8/include/cuda_runtime.h:83,from <command-line>:/mnt/disk2/zijie.zheng/cuda-11.8/include/crt/host_config.h:132:2: error: #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.132 | #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.|  ^~~~~error: command '/mnt/disk2/zijie.zheng/cuda-11.8/bin/nvcc' failed with exit code 1[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [47 lines of output]running develop/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.!!********************************************************************************Please avoid running ``setup.py`` and ``easy_install``.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://github.com/pypa/setuptools/issues/917 for details.********************************************************************************!!easy_install.initialize_options(self)/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.!!********************************************************************************Please avoid running ``setup.py`` directly.Instead, use pypa/build, pypa/installer or otherstandards-based tools.See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.********************************************************************************!!self.initialize_options()running egg_infowriting diff_gaussian_rasterization.egg-info/PKG-INFOwriting dependency_links to diff_gaussian_rasterization.egg-info/dependency_links.txtwriting top-level names to diff_gaussian_rasterization.egg-info/top_level.txt/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.warnings.warn(msg.format('we could not find ninja.'))reading manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'adding license file 'LICENSE.md'writing manifest file 'diff_gaussian_rasterization.egg-info/SOURCES.txt'running build_ext/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no g++ version bounds defined for CUDA version 11.8warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')building 'diff_gaussian_rasterization._C' extension/mnt/disk2/zijie.zheng/cuda-11.8/bin/nvcc -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include/TH -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/lib/python3.9/site-packages/torch/include/THC -I/mnt/disk2/zijie.zheng/cuda-11.8/include -I/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian/include/python3.9 -c cuda_rasterizer/backward.cu -o build/temp.linux-x86_64-cpython-39/cuda_rasterizer/backward.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -I/mnt/disk2/zijie.zheng/projects/github/PhysGaussian/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17In file included from /mnt/disk2/zijie.zheng/cuda-11.8/include/cuda_runtime.h:83,from <command-line>:/mnt/disk2/zijie.zheng/cuda-11.8/include/crt/host_config.h:132:2: error: #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.132 | #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.|  ^~~~~error: command '/mnt/disk2/zijie.zheng/cuda-11.8/bin/nvcc' failed with exit code 1

報錯原因:
這個報錯是GCC版本和CUDA的兼容性問題有關。CUDA 11.8 使用的是基于 GCC 9.x 或 GCC 10.x 的兼容性最好的編譯器版本。如果你系統默認的 GCC 是 11 或更高(特別是 12+),就會引發這種兼容性錯誤。
我們的系統GCC版是13.3.0,因此發生報錯。

解決方法:
主要思路是在沒有管理員權限的情況下降低GCC版本,試了好幾種方法,下面這種方法成功了。
(1)激活當前的 Conda 環境:conda activate PhysGaussian
(2)安裝 GCC 9:conda install -c conda-forge gcc_linux-64=9 gxx_linux-64=9
(3)設置環境變量讓 Python/CUDA 使用這個 GCC

export CC=$CONDA_PREFIX/bin/x86_64-conda-linux-gnu-gcc
export CXX=$CONDA_PREFIX/bin/x86_64-conda-linux-gnu-g++

(4)驗證 GCC 版本:$CC --version
驗證結果如下,表示安裝成功:

x86_64-conda-linux-gnu-cc (conda-forge gcc 9.5.0-19) 9.5.0
Copyright (C) 2019 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.

(5)重新運行命令:pip install -e gaussian-splatting/submodules/diff-gaussian-rasterization/

三、Unknown encoder ‘libx264’

運行命令python gs_simulation.py --model_path ./model/ficus_whitebg-trained/ --output_path output --config ./config/ficus_config.json --render_img --compile_video --white_bg的時候出現報錯。
報錯內容:主要是最后一行Unknown encoder ‘libx264’

configuration: --prefix=/mnt/disk2/zijie.zheng/anaconda3/envs/PhysGaussian --cc=/opt/conda/conda-bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lamelibavutil      56. 51.100 / 56. 51.100libavcodec     58. 91.100 / 58. 91.100libavformat    58. 45.100 / 58. 45.100libavdevice    58. 10.100 / 58. 10.100libavfilter     7. 85.100 /  7. 85.100libavresample   4.  0.  0 /  4.  0.  0libswscale      5.  7.100 /  5.  7.100libswresample   3.  7.100 /  3.  7.100
Input #0, image2, from 'output/%04d.png':Duration: 00:00:05.00, start: 0.000000, bitrate: N/AStream #0:0: Video: png, rgb24(pc), 800x800, 25 fps, 25 tbr, 25 tbn, 25 tbc
Unknown encoder 'libx264'

報錯原因:這意味著 ffmpeg 沒有編譯 libx264 支持,因此無法使用 libx264 編碼器導出 .mp4 等常見格式視頻。
解決方法
用conda list查看了一下當前ffmpeg的版本為 4.3,升級到指定版本4.3.1就行。

conda install -c conda-forge ffmpeg=4.3.1

安裝后可用ffmpeg -encoders | grep libx264檢查libx264是否可用。
PS:不要用conda install -c conda-forge ffmpeg,沒有指定版本,一下子把ffmpeg的版本號升級到7.幾,環境里的包出現了各種不兼容情況,一下子亂成一鍋粥TvT。

四、下載速度太慢、無法遞歸下載項目

使用readme文件中給的方法下載速度太慢了。

git clone --recurse-submodules git@github.com:XPandora/PhysGaussian.git

使用了代理后下載速度還是很慢,發現是因為沒有使用http協議,于是換成了http協議,下載速度明顯變快。
但“–recurse-submodules”并沒有起作用,項目中引用的一些其他項目并不能被下載下來。所以只能手動下載并添加到對應路徑中去了。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/pingmian/84579.shtml
繁體地址,請注明出處:http://hk.pswp.cn/pingmian/84579.shtml
英文地址,請注明出處:http://en.pswp.cn/pingmian/84579.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Python 實現 Web 靜態服務器(HTTP 協議)

目錄 一、在本地啟動 HTTP 服務器1. Windows 下安裝 node.js1&#xff09;下載安裝包2&#xff09;配置環境變量3&#xff09;安裝鏡像4&#xff09;node.js 的常用命令 2. 安裝 http-server 服務3. 使用 http-server 開啟服務1&#xff09;使用 http-server2&#xff09;詳解 …

MPMA:Preference Manipulation Attack Against Model Context Protocol

概要 MCP作為提供給LLM作為工具調用的標準化協議被廣泛應用&#xff0c;但是MCP在安全方面還比較脆弱。本文提出了一種MPMA攻擊方法通過在工具的名字或描述中插入具有操控性的文字、短語來操控LLM選擇MCP server的過程。 不了解MCP的具體細節可以看看我寫的這篇文章MCP 場景…

Vim 替換命令完整學習筆記

Vim 替換命令完整學習筆記 文章目錄 Vim 替換命令完整學習筆記1. 核心概念2. 替換命令基本語法2.1 基本格式2.2 分隔符選擇2.3 范圍指定 3. 替換標志詳解3.1 基礎標志3.2 高級標志3.3 標志組合 4. 正則表達式在替換中的應用4.1 基礎正則表達式4.2 字符類和量詞4.3 分組和引用 5…

@RequestBody和@ResponseBody注解的作用是什么

@RequestBody和@ResponseBody注解的作用是什么 文章目錄 @RequestBody和@ResponseBody注解的作用是什么@RequestBody和@ResponseBody注解的作用是什么SpringMVC的請求與響應模型1. 請求的處理流程1.1 DispatcherServlet作為入口1.2 Handler處理器與Controller1.3 HandlerAdapte…

質因數分解_java

什么是質因數&#xff1f; 說的通俗一點就是&#xff0c;這個數既是因數&#xff0c;又是質數。但是1不是質因數(不是質數)。然后比如122*2*3&#xff0c;里邊的2&#xff0c;3都是質數&#xff0c;并且也是12的因數&#xff0c;所以2、3就是12的質因數。 因為本人很菜&#xf…

SpringDoc集成到Springboot

1.Maven引入jar包 <dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-ui</artifactId><version>1.6.14</version> </dependency> 2.新建OpenApiConfig文件&#xff0c;代碼如下 package com.elan…

Memory Repair (五)

Compression Algorithm and Fuse Box Organization 通常情況下&#xff0c;這部分信息對于實現BISR&#xff08;內置自修復&#xff09;并非必需&#xff0c;但對于診斷問題可能有所幫助。 Compression and Fuse Box Organization Overview BISR controller采用的壓縮算法基于兩…

雙系統(win+linux)根目錄擴容(不掉GPU驅動)

先看效果&#xff0c;原來的根目錄僅50G&#xff0c;從/home節點分出擴容后變為250GB&#xff1b; 因為根分區是系統當前運行的文件系統&#xff0c;Linux系統啟動后會鎖定根分區&#xff0c;防止對其進行修改。這時使用系統內的工具&#xff08;如gparted&#xff09;調整根分…

oracle 23ai對象注釋新特性ANNOTATIONS

我們知道以前數據庫版本注釋方式是用COMMENT&#xff0c;如下 COMMENT ON COLUMN 表名.字段名 IS 字段注釋; oracle 23ai對象注釋有新增了ANNOTATIONS&#xff0c;比如創建如下表&#xff1a; SQL> create table test.t_user( id number, name varchar(200) ANNOTATIONS …

VMware 虛擬機開機自啟動配置指南

方法一&#xff1a;通過啟動文件夾設置&#xff08;簡單版&#xff09; 打開啟動文件夾&#xff1a; 按下 Win R 快捷鍵輸入 shell:startup 并回車 創建啟動腳本&#xff1a; 在打開的文件夾中右鍵新建一個文本文件命名為 vm_start.bat輸入以下內容&#xff1a; echo off &…

2025pmx文件怎么打開blender和虛幻

pmx文件怎么打開blender 前言 一坑接一坑。 意思很簡單&#xff0c;就是給Blender、3dsmax裝插件&#xff0c;然后就可以打開了。但是報錯就要多走很多錯路。 記錄一下。 內容 參考文章&#xff1a;https://blog.csdn.net/c858845275/article/details/144180555 我的Ble…

Kotlin基礎語法五

繼承與重載的open關鍵字 KT所有的類&#xff0c;默認是final修飾的&#xff0c;不能被繼承&#xff0c;和Java相反 open&#xff1a;移除final修飾 類型轉換 open class Person2(private val name: String) {fun showName() "父類 的姓名是【$name】"// KT所有的…

MySQL數據庫:關系型數據庫的基石

文章目錄 每日一句正能量前言一、MySQL簡介&#xff08;一&#xff09;什么是MySQL&#xff1f;&#xff08;二&#xff09;MySQL的歷史 二、MySQL的特點&#xff08;一&#xff09;開源與免費&#xff08;二&#xff09;高性能&#xff08;三&#xff09;跨平臺支持&#xff0…

【kafka】Golang實現分布式Masscan任務調度系統

要求: 輸出兩個程序,一個命令行程序(命令行參數用flag)和一個服務端程序。 命令行程序支持通過命令行參數配置下發IP或IP段、端口、掃描帶寬,然后將消息推送到kafka里面。 服務端程序: 從kafka消費者接收掃描任務信息通過調用masscan啟動探測任務,獲取進度和結果信息,…

ARM 和 x86_64是什么關系

什么是 ARM 和 x86_64&#xff1f; 它們都是 CPU 指令集架構&#xff08;ISA&#xff09; 指令集架構&#xff08;Instruction Set Architecture&#xff09;就是&#xff1a; CPU 能夠理解和執行的“語言”和“命令格式”。 類比解釋&#xff1a;指令集就像“語言” 類比對…

nginx配置中有無‘‘/’’的區別

在Nginx配置中&#xff0c;location指令末尾的斜杠/和proxy_pass目標地址末尾的斜杠/組合使用會產生顯著差異。以下是四種組合的區別詳解&#xff1a; ??核心區別對比表?? 配置方案匹配規則請求URI傳遞邏輯實際轉發效果示例location /api/ proxy_pass ...701/僅匹配/api/…

系統安全之身份認證

本篇我們對常用的身份認證協議做簡要的梳理&#xff0c;包括主流的 HTTP 相關認證協議以及證書密鑰對、新興的 WebAuthn 認證。 HTTP 協議認證 RFC 7235 中定義了 HTTP 協議的認證框架&#xff0c;要求在支持 HTTP 協議的服務器&#xff0c;如果訪問服務的身份驗證失敗&#…

部署http服務

使用flask搭建一個http服務&#xff0c;能夠通過本地的另外一個終端訪問對應接口&#xff0c;拿到服務端的計算結果 服務端&#xff1a; 創建一個test_http_dtw.py并運行 from flask import Flask, request, jsonifyapp Flask(__name__)# 示例分析函數 def analysis(data):…

WLAN 技術指南:從入門到原理

文章目錄 目錄 文章目錄 前言 一.WLAN 基本概念 有線側組網概念 AP-AC 組網方式 AC 連接方式 CAPWAP 協議 無線側組網概念 無線信道 ?編輯 BSS/SSID/BSSID ?編輯 VAP ESS 二.WLAN 組網架構 基本的 WLAN 組網架構 四.WLAN 工作原理 AP 上線 AP 獲取 IP 地址階段 CAP…

語言學習專用AI播放器推薦:LLPlayer

學語言&#xff0c;經常會看大量的比較優秀的視頻材料&#xff0c;那么推薦一款語言學習利器&#xff0c;極大提高生產力。 LLPlayer 是一款專為語言學習者設計的獨特視頻播放器。 它具有許多重要功能&#xff0c;例如可同時顯示文本字幕和位圖字幕、使用 OpenAI Whisper 自動…