复现论文报错解决

文章目录

  • 一、 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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈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 自动…