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

unable to install spconv v1.2 #211

Closed
Lyan1997 opened this issue Aug 2, 2020 · 1 comment
Closed

unable to install spconv v1.2 #211

Lyan1997 opened this issue Aug 2, 2020 · 1 comment
Labels

Comments

@Lyan1997
Copy link

Lyan1997 commented Aug 2, 2020

  1. version

python 3.7
torch1.6.0 torchvision 0.7.0
cuda 10.1
cmake version 3.13.2

2.This is what I did:

3.output error

/home/sdb1/zyan/lulu/lib/python3.7/site-packages/setuptools/distutils_patch.py:26: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
  "Distutils was imported before Setuptools. This usage is discouraged "
running bdist_wheel
running build
running build_py
running build_ext
Release
|||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/sdb1/zyan/lulu/lib/python3.7/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.7', '-DSPCONV_BuildTests=OFF', '-DPYTORCH_VERSION=10600', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/sdb1/zyan/lulu/spconv-1.2/build/lib.linux-x86_64-3.7/spconv', '-DCMAKE_BUILD_TYPE=Release']
-- The CUDA compiler identification is unknown
CMake Error at CMakeLists.txt:6 (project):
  No CMAKE_CUDA_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/home/sdb1/zyan/lulu/spconv-1.2/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/home/sdb1/zyan/lulu/spconv-1.2/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 109, in <module>
    zip_safe=False,
  File "/home/sdb1/zyan/lulu/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/home/zyz/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/zyz/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/zyz/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/sdb1/zyan/lulu/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run
    self.run_command('build')
  File "/home/zyz/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/zyz/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/zyz/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/zyz/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/zyz/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 49, in run
    self.build_extension(ext)
  File "setup.py", line 92, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/home/zyz/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/sdb1/zyan/lulu/spconv-1.2', '-DCMAKE_PREFIX_PATH=/home/sdb1/zyan/lulu/lib/python3.7/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.7', '-DSPCONV_BuildTests=OFF', '-DPYTORCH_VERSION=10600', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/sdb1/zyan/lulu/spconv-1.2/build/lib.linux-x86_64-3.7/spconv', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

Please help me!!!Thank you!

@miraliahmadli
Copy link

Do you have cuDNN installed?
Also it looks like you did not set the CMAKE_CUDA_COMPILER in the environment variables. You can edit the setup.py to add more options.
I had the similar issue and solved it by adding following line before subprocess.check_call in the build_extension function of setup.py (here):
cmake_args += ['-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc']

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

No branches or pull requests

2 participants