pmh47 / dirt

DIRT: a fast differentiable renderer for TensorFlow
MIT License
312 stars 63 forks source link

CMake error - Couldn't find CUDA library root #94

Open b-pronod opened 3 years ago

b-pronod commented 3 years ago

ERROR: Command errored out with exit status 1: command: /home/p16/anaconda3/envs/HOnnotate/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8j27e0g5/setup.py'"'"'; file='"'"'/tmp/pip-req-build-8j27e0g5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-f0dzrlsm cwd: /tmp/pip-req-build-8j27e0g5/ Complete output (36 lines): running bdist_wheel running build -- The CXX compiler identification is GNU 5.4.0 CMake Error at /home/p16/anaconda3/envs/HOnnotate/share/cmake-3.19/Modules/CMakeDetermineCUDACompiler.cmake:187 (message): Couldn't find CUDA library root. Call Stack (most recent call first): CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred! See also "/tmp/pip-req-build-8j27e0g5/build/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "", line 1, in File "/tmp/pip-req-build-8j27e0g5/setup.py", line 50, in 'Programming Language :: Python :: 3.7', File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run self.run_command('build') File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-req-build-8j27e0g5/setup.py", line 24, in run build_csrc() File "/tmp/pip-req-build-8j27e0g5/setup.py", line 18, in build_csrc subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path) File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-8j27e0g5/csrc']' returned non-zero exit status 1.

ERROR: Failed building wheel for dirt Running setup.py clean for dirt Failed to build dirt Installing collected packages: dirt Running setup.py install for dirt ... error ERROR: Command errored out with exit status 1: command: /home/p16/anaconda3/envs/HOnnotate/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8j27e0g5/setup.py'"'"'; file='"'"'/tmp/pip-req-build-8j27e0g5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-95k6vfgo/install-record.txt --single-version-externally-managed --compile --install-headers /home/p16/anaconda3/envs/HOnnotate/include/python3.7m/dirt cwd: /tmp/pip-req-build-8j27e0g5/ Complete output (37 lines): running install running build CMake Error at /home/p16/anaconda3/envs/HOnnotate/share/cmake-3.19/Modules/CMakeDetermineCUDACompiler.cmake:187 (message): Couldn't find CUDA library root. Call Stack (most recent call first): CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-8j27e0g5/build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-8j27e0g5/setup.py", line 50, in <module>
    'Programming Language :: Python :: 3.7',
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/command/install.py", line 545, in run
    self.run_command('build')
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-8j27e0g5/setup.py", line 24, in run
    build_csrc()
  File "/tmp/pip-req-build-8j27e0g5/setup.py", line 18, in build_csrc
    subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
  File "/home/p16/anaconda3/envs/HOnnotate/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-8j27e0g5/csrc']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /home/p16/anaconda3/envs/HOnnotate/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8j27e0g5/setup.py'"'"'; file='"'"'/tmp/pip-req-build-8j27e0g5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-95k6vfgo/install-record.txt --single-version-externally-managed --compile --install-headers /home/p16/anaconda3/envs/HOnnotate/include/python3.7m/dirt Check the logs for full command output.

Same result when installing with Ubuntu18.04 LTS. The above error is from Ubuntu16.04 LTS running on wsl2. Please suggest solution.

markstrefford commented 3 years ago

Have you installed cudnn? And is CUDA_HOME set in your environment?

lynnpepin commented 2 years ago

@b-pronod, were you able to solve this, and if so, do you recall how?