spconv
spconv copied to clipboard
Error in python setup.py bdist_wheel
When I run python setup.py bdist_wheel, the error is shown below, how can I solve it?
running bdist_wheel
running build
running build_py
running build_ext
Release
|||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/zjlab/anaconda3/envs/lyj/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/zjlab/lyj/SE-SSD/spconv
/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release']
-- Caffe2: CUDA detected: 9.1
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 9.1
-- Found cuDNN: v7.5.0 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s): 7.0 7.0 7.0 7.0
-- Added CUDA NVCC flags for: -gencode;arch=compute_70,code=sm_70
CMake Warning (dev) at /snap/cmake/1088/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:438 (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/zjlab/anaconda3/envs/lyj/lib/python3.6/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:130 (find_package_handle_standard_args
)
CMakeLists.txt:23 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- pybind11 v2.3.dev0
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_CUDA_LIB
linked by target "spconv" in directory /home/zjlab/lyj/SE-SSD/spconv/src/spconv
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 at src/spconv/CMakeLists.txt:1 (add_library):
Cannot generate a safe runtime search path for target spconv because files
in some directories may conflict with libraries in implicit directories:
runtime library [libnvToolsExt.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/cuda/lib64
Some of these libraries may not be found correctly.
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
CMake Generate step failed. Build files cannot be regenerated correctly.
Traceback (most recent call last):
File "setup.py", line 89, in
zip_safe=False,
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/zjlab/anaconda3/envs/lyj/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 72, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/home/zjlab/anaconda3/envs/lyj/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/zjlab/lyj/SE-SSD/spconv', '-DCMAKE_PREFIX_PATH=/home/zjlab/anaconda3/envs/lyj/lib/py
thon3.6/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.6', '-DSPCONV_BuildTests=OFF', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr"', '-
DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/zjlab/lyj/SE-SSD/spconv/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release']' returned non
-zero exit status 1.
I was facing the same error.
I am able to successfully run python setup.py bdist_wheel
.
You need to make sure cmake >= 3.13.2 is installed and add cmake executables to PATH.
To add cmake executables to PATH:
nano ~/.bashrc
add line export PATH=/usr/local/bin/cmake:$PATH
(you can get path of your cmake path by running command which cmake
)
add line export PATH=/usr/include/boost:$PATH
(you can get path of your boost path by running command whereis boost
)
save and close the bashrc file.
source ~/.bashrc
close the current terminal and open new terminal. Then run python setup.py bdist_wheel
.
/home/UNT/sd0570/anaconda3/envs/nutonomy/lib/python3.7/site-packages/setuptools/installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. SetuptoolsDeprecationWarning, running bdist_wheel running build running build_py running build_ext Release |||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/UNT/sd0570/anaconda3/envs/nutonomy/lib/python3.7/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.7', '-DSPCONV_BuildTests=OFF', '-DPYTORCH_VERSION=10700', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/UNT/sd0570/spconv/build/lib.linux-x86_64-cpython-37/spconv', '-DCMAKE_BUILD_TYPE=Release'] -- Caffe2: CUDA detected: 10.1 -- Caffe2: CUDA nvcc is: /usr/local/cuda-10.1/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.1 -- Caffe2: Header version is: 10.1 -- Found cuDNN: v7.5.0 (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so) -- Autodetected CUDA architecture(s): 6.1 -- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61 CMake Error at /home/UNT/sd0570/anaconda3/envs/nutonomy/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Targets.cmake:98 (set_target_properties): set_target_properties Can not find target to add properties to: torch_cuda_library Call Stack (most recent call first): /home/UNT/sd0570/anaconda3/envs/nutonomy/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:110 (include) /home/UNT/sd0570/anaconda3/envs/nutonomy/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package) CMakeLists.txt:22 (find_package)
-- Autodetected CUDA architecture(s): 6.1
-- pybind11 v2.5.0
-- Configuring incomplete, errors occurred!
See also "/home/UNT/sd0570/spconv/build/temp.linux-x86_64-cpython-37/CMakeFiles/CMakeOutput.log".
See also "/home/UNT/sd0570/spconv/build/temp.linux-x86_64-cpython-37/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "setup.py", line 108, in