python setup.py bdist_wheel failed

See original GitHub issue

First of all, thank you very much for your code.I have a problem when running the command python setup.py bdist_wheel .Although I followed the instructions in #78 and #70 by @MartinHahner, #21, #167 , it did not work.Then I rummaged through almost all the problems, but I didn’t solve it.I would appreciate it if you can help me.My environment is as follows: OS version:Ubuntu 18.04 GPU name:TITAN V CUDA version:9.2 Pytorch:1.1 Python:3.6 gcc version:7.5.0 image image image image

running bdist_wheel running build running build_py running build_ext /home/gye/PointCloud/objectDetection/spconv_8da6f96/build/lib.linux-x86_64-3.6 Release – The CUDA compiler identification is unknown – Check for working CUDA compiler: /home/gye/anaconda3/envs/cuda92/bin/nvcc – Check for working CUDA compiler: /home/gye/anaconda3/envs/cuda92/bin/nvcc – broken CMake Error at /home/gye/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.13/Modules/CMakeTestCUDACompiler.cmake:46 (message): The CUDA compiler

"/home/gye/anaconda3/envs/cuda92/bin/nvcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_cd192/fast"
/usr/bin/make -f CMakeFiles/cmTC_cd192.dir/build.make CMakeFiles/cmTC_cd192.dir/build
make[1]: 进入目录“/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp”
Building CUDA object CMakeFiles/cmTC_cd192.dir/main.cu.o
/home/gye/anaconda3/envs/cuda92/bin/nvcc    "--expt-relaxed-constexpr"    -x cu -c /home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_cd192.dir/main.cu.o
Linking CUDA device code CMakeFiles/cmTC_cd192.dir/cmake_device_link.o
/home/gye/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cd192.dir/dlink.txt --verbose=1
/home/gye/anaconda3/envs/cuda92/bin/nvcc  "--expt-relaxed-constexpr"    -shared -dlink CMakeFiles/cmTC_cd192.dir/main.cu.o -o CMakeFiles/cmTC_cd192.dir/cmake_device_link.o 
Linking CUDA executable cmTC_cd192
/home/gye/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cd192.dir/link.txt --verbose=1
""   CMakeFiles/cmTC_cd192.dir/main.cu.o CMakeFiles/cmTC_cd192.dir/cmake_device_link.o -o cmTC_cd192 
Error running link command: No such file or directory
CMakeFiles/cmTC_cd192.dir/build.make:105: recipe for target 'cmTC_cd192' failed
make[1]: *** [cmTC_cd192] Error 2
make[1]: 离开目录“/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp”
Makefile:121: recipe for target 'cmTC_cd192/fast' failed
make: *** [cmTC_cd192/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)

– Configuring incomplete, errors occurred! See also “/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log”. See also “/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log”. Traceback (most recent call last): File “setup.py”, line 103, in <module> zip_safe=False, File “/home/gye/anaconda3/envs/spconv/lib/python3.6/site-packages/setuptools/init.py”, line 163, in setup return distutils.core.setup(**attrs) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/core.py”, line 148, in setup dist.run_commands() File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 955, in run_commands self.run_command(cmd) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “/home/gye/anaconda3/envs/spconv/lib/python3.6/site-packages/wheel/bdist_wheel.py”, line 290, in run self.run_command(‘build’) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/cmd.py”, line 313, in run_command self.distribution.run_command(command) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/command/build.py”, line 135, in run self.run_command(cmd_name) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/cmd.py”, line 313, in run_command self.distribution.run_command(command) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “setup.py”, line 39, in run self.build_extension(ext) File “setup.py”, line 71, in build_extension subprocess.check_call([‘cmake’, ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/subprocess.py”, line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[‘cmake’, ‘/home/gye/PointCloud/objectDetection/spconv_8da6f96’, ‘-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/lib.linux-x86_64-3.6/spconv’, ‘-DCMAKE_PREFIX_PATH=/home/gye/anaconda3/envs/spconv/lib/python3.6/site-packages/torch’, ‘-DPYBIND11_PYTHON_VERSION=3.6’, ‘-DSPCONV_BuildTests=OFF’, ‘-DCMAKE_CUDA_FLAGS=“–expt-relaxed-constexpr”’, ‘-DCMAKE_BUILD_TYPE=Release’, ‘-DCMAKE_CUDA_COMPILER:FILEPATH=/home/gye/anaconda3/envs/cuda92/bin/nvcc’]’ returned non-zero exit status 1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

2reactions
GYE19970220commented, Oct 21, 2020

It is caused by the version of g++.When I change the g++ version from 4.8.5 to 7,it was solved.So the error that “g++: error: unrecognized command line option ‘-std=c++14’” means the version of g++ is too low,because -std=c++14 requires g++5.2 or more.

0reactions
sidmlcommented, Nov 9, 2021

Putting my solution for reference.

File “/opt/conda/lib/python3.7/site-packages/spconv/conv.py”, line 181, in forward use_hash=self.use_hash) File “/opt/conda/lib/python3.7/site-packages/spconv/ops.py”, line 95, in get_indice_pairs int(use_hash)) ValueError: /home/sid/spconv/src/spconv/spconv_ops.cc 87 unknown device type

I got this error because I had previously compiled a different version of spconv and was reusing the build folder. Removing the build folder and building the wheel again from scratch solved the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in python setup.py bdist_wheel · Issue #484 - GitHub
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
Read more >
Python setup.py bdist_wheel did not run successfully
To solve the "Python setup.py bdist_wheel did not run successfully" error, run the pip install cmake command and make sure you have the ......
Read more >
Docutils Building Wheels - SourceForge
Run python setup.py bdist_wheel: error: invalid command 'bdist_wheel'. setuptools is too old. Install the new one by wheel or source or pip or...
Read more >
Running setup.py bdist_wheel for cx-Freeze ... error
Failed building wheel for cx-Freeze Running setup.py clean for cx-Freeze Failed to build cx-Freeze Command "/usr/bin/python -u -c "import setuptools, ...
Read more >
python setup.py bdist_wheel did not run successfully. - You.com
To solve the "Python setup.py bdist_wheel did not run successfully" error, run the pip install cmake command and make sure you have the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found