ashawkey / cubvh

CUDA Mesh BVH tools.
MIT License
156 stars 11 forks source link

Install bug #1

Closed HaoZhang990127 closed 1 year ago

HaoZhang990127 commented 1 year ago

Hi,

Thank you for you nice work.

I have face a bug when I install the package. Could you give me some advice to solve it? Thank you very much.

Requirement already satisfied: six>=1.5 in /home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib->cubvh==0.1.0) (1.16.0) Building wheels for collected packages: cubvh Building wheel for cubvh (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [97 lines of output] Couldn't find Eigen locally, downloading... Found eigen at eigen-3.3.7 running bdist_wheel running build running build_ext building '_cubvh' extension creating /tmp/pip-req-build-wi32p8rv/build creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9 creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src Emitting ninja build file /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/3] c++ -MMD -MF /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o.d -pthread -B /home/hzhang/anaconda3/envs/latent-nerf/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -I/home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bindings.cpp -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 FAILED: /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o c++ -MMD -MF /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o.d -pthread -B /home/hzhang/anaconda3/envs/latent-nerf/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -I/home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bindings.cpp -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 In file included from /tmp/pip-req-build-wi32p8rv/src/bindings.cpp:3: /home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/pybind11/eigen.h:36:10: fatal error: Eigen/Core: No such file or directory 36 | #include <Eigen/Core> | ^~~~ compilation terminated. [2/3] /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/api.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/api.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 FAILED: /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/api.o /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/api.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/api.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 /tmp/pip-req-build-wi32p8rv/src/api.cu:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ In file included from /tmp/pip-req-build-wi32p8rv/src/api.cu:3: /tmp/pip-req-build-wi32p8rv/include/cubvh/api.h:3:10: fatal error: Eigen/Dense: No such file or directory 3 | #include <Eigen/Dense> | ^~~~~ compilation terminated. [3/3] /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bvh.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bvh.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 FAILED: /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bvh.o /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bvh.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bvh.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 In file included from /tmp/pip-req-build-wi32p8rv/src/bvh.cu:2: /tmp/pip-req-build-wi32p8rv/include/cubvh/common.h:14:10: fatal error: Eigen/Dense: No such file or directory 14 | #include <Eigen/Dense> | ^~~~~ compilation terminated. ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1717, in _run_ninja_build subprocess.run( File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-req-build-wi32p8rv/setup.py", line 118, in <module>
      setup(
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 735, in build_extensions
      build_ext.build_extensions(self)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
      _build_ext.build_extension(self, ext)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
      objects = self.compiler.compile(sources,
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 556, in unix_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1399, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1733, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cubvh Running setup.py clean for cubvh Failed to build cubvh Installing collected packages: cubvh Running setup.py install for cubvh ... error error: subprocess-exited-with-error

× Running setup.py install for cubvh did not run successfully. │ exit code: 1 ╰─> [99 lines of output] Couldn't find Eigen locally, downloading... Found eigen at eigen-3.3.7 running install running build running build_ext building '_cubvh' extension creating /tmp/pip-req-build-wi32p8rv/build creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9 creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv creating /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src Emitting ninja build file /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/3] /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bvh.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bvh.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 FAILED: /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bvh.o /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bvh.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bvh.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 In file included from /tmp/pip-req-build-wi32p8rv/src/bvh.cu:2: /tmp/pip-req-build-wi32p8rv/include/cubvh/common.h:14:10: fatal error: Eigen/Dense: No such file or directory 14 | #include <Eigen/Dense> | ^~~~~ compilation terminated. [2/3] c++ -MMD -MF /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o.d -pthread -B /home/hzhang/anaconda3/envs/latent-nerf/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -I/home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bindings.cpp -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 FAILED: /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o c++ -MMD -MF /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o.d -pthread -B /home/hzhang/anaconda3/envs/latent-nerf/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -I/home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -O2 -isystem /home/hzhang/anaconda3/envs/latent-nerf/include -fPIC -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/bindings.cpp -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 In file included from /tmp/pip-req-build-wi32p8rv/src/bindings.cpp:3: /home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/pybind11/eigen.h:36:10: fatal error: Eigen/Core: No such file or directory 36 | #include <Eigen/Core> | ^~~~ compilation terminated. [3/3] /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/api.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/api.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 FAILED: /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/api.o /is/software/nvidia/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-wi32p8rv/include -Ieigen-3.3.7 -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/TH -I/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/include/THC -I/is/software/nvidia/cuda-11.3/include -I/home/hzhang/anaconda3/envs/latent-nerf/include/python3.9 -c -c /tmp/pip-req-build-wi32p8rv/src/api.cu -o /tmp/pip-req-build-wi32p8rv/build/temp.linux-x86_64-3.9/tmp/pip-req-build-wi32p8rv/src/api.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 /tmp/pip-req-build-wi32p8rv/src/api.cu:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ In file included from /tmp/pip-req-build-wi32p8rv/src/api.cu:3: /tmp/pip-req-build-wi32p8rv/include/cubvh/api.h:3:10: fatal error: Eigen/Dense: No such file or directory 3 | #include <Eigen/Dense> | ^~~~~ compilation terminated. ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1717, in _run_ninja_build subprocess.run( File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-req-build-wi32p8rv/setup.py", line 118, in <module>
      setup(
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
      return orig.install.run(self)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/install.py", line 546, in run
      self.run_command('build')
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 735, in build_extensions
      build_ext.build_extensions(self)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
      _build_ext.build_extension(self, ext)
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
      objects = self.compiler.compile(sources,
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 556, in unix_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1399, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File "/home/hzhang/anaconda3/envs/latent-nerf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1733, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> cubvh

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

ashawkey commented 1 year ago

@Jan-990127 Hi, it looks eigen is not found:

0: fatal error: Eigen/Dense: No such file or directory

You could try to install eigen first: sudo apt install libeigen3-dev

HaoZhang990127 commented 1 year ago

Thank you for your reply.

Now I can success install cubvh like this. Building wheels for collected packages: cubvh Building wheel for cubvh (setup.py) ... done Created wheel for cubvh: filename=cubvh-0.1.0-cp39-cp39-linux_x86_64.whl size=155701 sha256=5e3e193c3a449e1028d18b9d44b8a5ffc944089da78e40fe313cef5b847a4ae6 Stored in directory: /tmp/pip-ephem-wheel-cache-2da1_hjg/wheels/f1/8f/67/6ff6ec43b67c3c5b6219e5d0852b44cde5fea3ef500a41f3cb Successfully built cubvh Installing collected packages: cubvh Successfully installed cubvh-0.1.0

But, when I run my code, it still complain
import cubvh ModuleNotFoundError: No module named 'cubvh'

ashawkey commented 1 year ago

@Jan-990127 There is a missing entry in setup.py which causes the bug when directly installed from github, and @kulits has kindly helped to fix it, you can try with the latest version!

HaoZhang990127 commented 1 year ago

I have installed it successfully, thank you very much :)