Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install submodules/diff-gaussian-rasterization PROBLEMS #4

Open
Gagouking opened this issue Jan 14, 2025 · 1 comment
Open

pip install submodules/diff-gaussian-rasterization PROBLEMS #4

Gagouking opened this issue Jan 14, 2025 · 1 comment

Comments

@Gagouking
Copy link

我按照readme真实感渲染部分到第3步:安装diff-gaussian-rasterization
pip install submodules/diff-gaussian-rasterization这条命令时出现如下报错:、

(DISCOVERSE) user@user-System-Product-Name:~/DISCOVERSE$ pip install submodules/diff-gaussian-rasterization
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./submodules/diff-gaussian-rasterization
Preparing metadata (setup.py) ... done
Building wheels for collected packages: diff_gaussian_rasterization
Building wheel for diff_gaussian_rasterization (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [86 lines of output]
running bdist_wheel
/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/utils/cpp_extension.py:497: 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.'))
running build
running build_py
creating build/lib.linux-x86_64-cpython-312
creating build/lib.linux-x86_64-cpython-312/diff_gaussian_rasterization
copying diff_gaussian_rasterization/init.py -> build/lib.linux-x86_64-cpython-312/diff_gaussian_rasterization
running build_ext
/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/utils/cpp_extension.py:426: UserWarning: There are no g++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'diff_gaussian_rasterization.C' extension
creating build/temp.linux-x86_64-cpython-312
creating build/temp.linux-x86_64-cpython-312/cuda_rasterizer
/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/utils/cpp_extension.py:1964: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
/usr/local/cuda/bin/nvcc -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/TH -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/user/下载/yes/envs/DISCOVERSE/include/python3.12 -c cuda_rasterizer/backward.cu -o build/temp.linux-x86_64-cpython-312/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/home/user/DISCOVERSE/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_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
cuda_rasterizer/auxiliary.h(151): warning #177-D: variable "p_proj" was declared but never referenced
float3 p_proj = { p_hom.x * p_w, p_hom.y * p_w, p_hom.z * p_w };
^

  Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
  
  /usr/local/cuda/bin/nvcc -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/TH -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/user/下载/yes/envs/DISCOVERSE/include/python3.12 -c cuda_rasterizer/forward.cu -o build/temp.linux-x86_64-cpython-312/cuda_rasterizer/forward.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/home/user/DISCOVERSE/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_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
  cuda_rasterizer/auxiliary.h(151): warning #177-D: variable "p_proj" was declared but never referenced
     float3 p_proj = { p_hom.x * p_w, p_hom.y * p_w, p_hom.z * p_w };
            ^
  
  Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
  
  /usr/local/cuda/bin/nvcc -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/TH -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/user/下载/yes/envs/DISCOVERSE/include/python3.12 -c cuda_rasterizer/rasterizer_impl.cu -o build/temp.linux-x86_64-cpython-312/cuda_rasterizer/rasterizer_impl.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/home/user/DISCOVERSE/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_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
  cuda_rasterizer/auxiliary.h(151): warning #177-D: variable "p_proj" was declared but never referenced
     float3 p_proj = { p_hom.x * p_w, p_hom.y * p_w, p_hom.z * p_w };
            ^
  
  Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
  
  gcc -pthread -B /home/user/下载/yes/envs/DISCOVERSE/compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/user/下载/yes/envs/DISCOVERSE/include -fPIC -O2 -isystem /home/user/下载/yes/envs/DISCOVERSE/include -fPIC -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/TH -I/home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/user/下载/yes/envs/DISCOVERSE/include/python3.12 -c ext.cpp -o build/temp.linux-x86_64-cpython-312/ext.o -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 -std=c++17
  In file included from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/ATen/core/TensorBase.h:14:0,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/ATen/core/TensorBody.h:38,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/ATen/core/Tensor.h:3,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/ATen/Tensor.h:3,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/extension.h:5,
                   from ext.cpp:12:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/c10/util/C++17.h:13:2: 错误:#error "You're trying to build PyTorch with a too old version of GCC. We need GCC 9 or later."
   #error \
    ^~~~~
  In file included from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules.h:20:0,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:7,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/all.h:16,
                   from /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/extension.h:5,
                   from ext.cpp:12:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 3; Derived = torch::nn::ConvTranspose3dImpl]’:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:101:21:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 3; Derived = torch::nn::ConvTranspose3dImpl]’
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/Exceptions.h:286:8:   required from here
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:110:28: 警告:unused variable ‘fan_out’ [-Wunused-variable]
         auto [fan_in, fan_out] = init::_calculate_fan_in_and_fan_out(weight);
                              ^
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 2; Derived = torch::nn::ConvTranspose2dImpl]’:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:101:21:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 2; Derived = torch::nn::ConvTranspose2dImpl]’
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/Exceptions.h:286:8:   required from here
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:110:28: 警告:unused variable ‘fan_out’ [-Wunused-variable]
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 1; Derived = torch::nn::ConvTranspose1dImpl]’:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:101:21:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 1; Derived = torch::nn::ConvTranspose1dImpl]’
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/Exceptions.h:286:8:   required from here
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:110:28: 警告:unused variable ‘fan_out’ [-Wunused-variable]
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 3; Derived = torch::nn::Conv3dImpl]’:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:101:21:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 3; Derived = torch::nn::Conv3dImpl]’
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/Exceptions.h:286:8:   required from here
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:110:28: 警告:unused variable ‘fan_out’ [-Wunused-variable]
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 2; Derived = torch::nn::Conv2dImpl]’:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:101:21:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 2; Derived = torch::nn::Conv2dImpl]’
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/Exceptions.h:286:8:   required from here
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:110:28: 警告:unused variable ‘fan_out’ [-Wunused-variable]
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h: In instantiation of ‘void torch::nn::ConvNdImpl<D, Derived>::reset_parameters() [with long unsigned int D = 1; Derived = torch::nn::Conv1dImpl]’:
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:101:21:   required from ‘void torch::nn::ConvNdImpl<D, Derived>::reset() [with long unsigned int D = 1; Derived = torch::nn::Conv1dImpl]’
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/Exceptions.h:286:8:   required from here
  /home/user/下载/yes/envs/DISCOVERSE/lib/python3.12/site-packages/torch/include/torch/csrc/api/include/torch/nn/modules/conv.h:110:28: 警告:unused variable ‘fan_out’ [-Wunused-variable]
  error: command '/usr/local/bin/gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for diff_gaussian_rasterization
Running setup.py clean for diff_gaussian_rasterization
Failed to build diff_gaussian_rasterization
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (diff_gaussian_rasterization)

电脑系统:ubuntu 22.04,
显卡:4080

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2
之前还升级了CUDA到12.1 ,pytorch也升级到了相应的版本,但是pip 仍然报错

@TATP-233
Copy link
Owner

#error "You're trying to build PyTorch with a too old version of GCC. We need GCC 9 or later."
更新一下gcc版本试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants