NVlabs / gbrl_sb3

GBRL-based Actor-Critic algorithms implemented in stable-baselines3
Other
25 stars 2 forks source link

(python3.9)failed to install gbrl==1.0.4 #2

Open ZhangTao-Hub opened 1 month ago

ZhangTao-Hub commented 1 month ago

$ pip install gbrl Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/ Collecting gbrl Using cached https://pypi.tuna.tsinghua.edu.cn/packages/24/44/93e399df28ae94e1ca2356ee8e009ca426ff579a27cf1f9d2fc79711b579/gbrl-1.0.4.tar.gz (101 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [94 lines of output] C:\Users\tao\AppData\Local\Temp\pip-install-d3fr8qm4\gbrl_8bf908acf5b34e02adad84a083654af8
running egg_info writing gbrl.egg-info\PKG-INFO writing dependency_links to gbrl.egg-info\dependency_links.txt writing requirements to gbrl.egg-info\requires.txt writing top-level names to gbrl.egg-info\top_level.txt Running command: cmake C:\Users\tao\AppData\Local\Temp\pip-install-d3fr8qm4\gbrl_8bf908acf5b34e02adad84a083654af8 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\tao\AppData\Local\Temp\pip-install-d3fr8qm4\gbrl_8bf908acf5b34e02adad84a083654af8\build\lib.win-amd64-cpython-39\gbrl -DPYTHON_EXECUTABLE=D:\anaconda\envs\py39\python.exe -DPYTHON_INCLUDE_DIR=D:\anaconda\envs\py39\Include -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=ON -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19042. -- The C compiler identification is MSVC 19.41.34120.0 -- The CXX compiler identification is MSVC 19.41.34120.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/Microsoft VS Studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/Microsoft VS Studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Python3: D:/anaconda/envs/py39/python.exe (found version "3.9.0") found components: Interpreter Development Development.Module Development.Embed -- Configured CUDA host compiler: D:/Microsoft VS Studio/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe -- Setting CMAKE_CUDA_COMPILER to C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe CMake Warning at C:/Users/tao/AppData/Local/Temp/pip-build-env-miofkspx/overlay/Lib/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCUDACompiler.cmake:15 (message): Visual Studio does not support specifying CUDAHOSTCXX or CMAKE_CUDA_HOST_COMPILER. Using the C++ compiler provided by Visual Studio. Call Stack (most recent call first): CMakeLists.txt:105 (enable_language)

  CMake Error at C:/Users/tao/AppData/Local/Temp/pip-build-env-miofkspx/overlay/Lib/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCompilerId.cmake:587 (message):
    No CUDA toolset found.
  Call Stack (most recent call first):
    C:/Users/tao/AppData/Local/Temp/pip-build-env-miofkspx/overlay/Lib/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)     
    C:/Users/tao/AppData/Local/Temp/pip-build-env-miofkspx/overlay/Lib/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
    C:/Users/tao/AppData/Local/Temp/pip-build-env-miofkspx/overlay/Lib/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)       
    CMakeLists.txt:105 (enable_language)

  -- Configuring incomplete, errors occurred!
  Command ['cmake', 'C:\\Users\\tao\\AppData\\Local\\Temp\\pip-install-d3fr8qm4\\gbrl_8bf908acf5b34e02adad84a083654af8', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\tao\\AppData\\Local\\Temp\\pip-install-d3fr8qm4\\gbrl_8bf908acf5b34e02adad84a083654af8\\build\\lib.win-amd64-cpython-39\\gbrl', '-DPYTHON_EXECUTABLE=D:\\anaconda\\envs\\py39\\python.exe', '-DPYTHON_INCLUDE_DIR=D:\\anaconda\\envs\\py39\\Include', '-DCMAKE_BUILD_TYPE=Release', '-DUSE_CUDA=ON'] failed with error code 1        
  None
  Traceback (most recent call last):
    File "D:\anaconda\envs\py39\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\anaconda\envs\py39\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "D:\anaconda\envs\py39\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
      self.run_setup()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
      exec(code, locals())
    File "<string>", line 97, in <module>
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
      return run_commands(dist)
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
      dist.run_commands()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\dist.py", line 950, in run_command
      super().run_command(command)
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 311, in run
      self.find_sources()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 319, in find_sources
      mm.run()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 540, in run
      self.add_defaults()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 578, in add_defaults
      sdist.add_defaults(self)
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\command\sdist.py", line 108, in add_defaults
      super().add_defaults()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 238, in add_defaults
      self._add_defaults_ext()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 322, in _add_defaults_ext
      build_ext = self.get_finalized_command('build_ext')
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 303, in get_finalized_command
      cmd_obj.ensure_finalized()
    File "C:\Users\tao\AppData\Local\Temp\pip-build-env-miofkspx\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 111, in ensure_finalized
      self.finalize_options()
    File "<string>", line 34, in finalize_options
    File "<string>", line 68, in build_extension
    File "<string>", line 77, in run_subprocess
    File "D:\anaconda\envs\py39\lib\subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\tao\\AppData\\Local\\Temp\\pip-install-d3fr8qm4\\gbrl_8bf908acf5b34e02adad84a083654af8', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\tao\\AppData\\Local\\Temp\\pip-install-d3fr8qm4\\gbrl_8bf908acf5b34e02adad84a083654af8\\build\\lib.win-amd64-cpython-39\\gbrl', '-DPYTHON_EXECUTABLE=D:\\anaconda\\envs\\py39\\python.exe', '-DPYTHON_INCLUDE_DIR=D:\\anaconda\\envs\\py39\\Include', '-DCMAKE_BUILD_TYPE=Release', '-DUSE_CUDA=ON']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

benja263 commented 1 month ago

It seems that the installation cannot find nvcc, the cuda compiler. Ensure that it is installed and that running, nvcc -v works.

Follow https://nvlabs.github.io/gbrl/quickstart.html, and install gbrl separately before installing the other requirements.