V2AI / Det3D

World's first general purpose 3D object detection codebse.
https://arxiv.org/abs/1908.09492
Apache License 2.0
1.48k stars 299 forks source link

Error while running "python setup.py bdist_wheel" for Spconv #130

Closed Ironman1508 closed 2 years ago

Ironman1508 commented 3 years ago

Hi, firstly thanks for the code. I have using a azure virtual machine for using this repo.

OS : ubuntu 16.04 Cuda : 10.2 Cudnn : 7.6.5 Python : 3.6.12 Pytorch : 1.3(using the command provided in the installation.md Cmake : Latest(3.18.2)

While i was running the command for installing spconv using the command provided in the Installation.md. In that when i run this command _python setup.py bdist_wheel_, i'm getting this error. Could someone tell me what is the solution to resolve it.

Commands followed before this command are $ sudo apt-get install libboost-all-dev $ git clone https://github.com/traveller59/spconv.git --recursive $ cd spconv && git checkout 7342772

The Ouput when i run python setup.py bdist_wheel is : `$ python3 setup.py bdist_wheel

running bdist_wheel running build running build_py running build_ext Release |||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/tcs/.local/lib/python3.6/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.6', '-DSPCONV_BuildTests=OFF', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr"', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/tcs/spconv/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release'] -- Caffe2: CUDA detected: 10.2 -- Caffe2: CUDA nvcc is: /usr/local/cuda-10.2/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.2 -- Caffe2: Header version is: 10.2 -- Found cuDNN: v7.6.5 (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so) -- Autodetected CUDA architecture(s): 3.7 -- Added CUDA NVCC flags for: -gencode;arch=compute_37,code=sm_37 CMake Warning (dev) at /home/tcs/.local/lib/python2.7/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message): The package name passed to find_package_handle_standard_args (torch) does not match the name of the calling package (Torch). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Call Stack (most recent call first): /home/tcs/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:103 (find_package_handle_standard_args) CMakeLists.txt:23 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- pybind11 v2.5.0 -- Configuring done CMake Warning (dev) in src/spconv/CMakeLists.txt: Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv". This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in src/spconv/CMakeLists.txt: Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv". This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt: Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv_nms". This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in src/utils/CMakeLists.txt: Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

CUDA_ARCHITECTURES is empty for target "spconv_nms". This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done -- Build files have been written to: /home/tcs/spconv/build/temp.linux-x86_64-3.6 [ 15%] Built target spconv_nms [ 23%] Building CXX object src/utils/CMakeFiles/spconv_utils.dir/all.cc.o [ 92%] Built target spconv In file included from /home/tcs/spconv/third_party/pybind11/include/pybind11/pytypes.h:12:0, from /home/tcs/spconv/third_party/pybind11/include/pybind11/cast.h:13, from /home/tcs/spconv/third_party/pybind11/include/pybind11/attr.h:13, from /home/tcs/spconv/third_party/pybind11/include/pybind11/pybind11.h:44, from /home/tcs/spconv/include/spconv/nms.h:17, from /home/tcs/spconv/src/utils/all.cc:15: /home/tcs/spconv/third_party/pybind11/include/pybind11/detail/common.h:112:20: fatal error: Python.h: No such file or directory compilation terminated. src/utils/CMakeFiles/spconv_utils.dir/build.make:81: recipe for target 'src/utils/CMakeFiles/spconv_utils.dir/all.cc.o' failed make[2]: [src/utils/CMakeFiles/spconv_utils.dir/all.cc.o] Error 1 CMakeFiles/Makefile2:183: recipe for target 'src/utils/CMakeFiles/spconv_utils.dir/all' failed make[1]: [src/utils/CMakeFiles/spconv_utils.dir/all] Error 2 Makefile:148: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 89, in zip_safe=False, File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 179, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 40, in run self.build_extension(ext) File "setup.py", line 73, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2. `

poodarchu commented 3 years ago

fatal error: Python.h: No such file or directory compilation terminated.