Skip to content

Installation errors #21

@chrischoy

Description

@chrischoy

      [stderr]
      <string>:106: UserWarning: flash_attn was requested, but nvcc was not found.  Are you sure your environment has nvcc available?  If you're installing within a container from
      https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc.
      Traceback (most recent call last):
        File "<string>", line 11, in <module>
        File "/workspace/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 432, in build_wheel
          return _build(['bdist_wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^
        File "/workspace/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 423, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/workspace/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
          self.run_setup()
        File "/workspace/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/workspace/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 227, in <module>
        File "/workspace/.venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1347, in CUDAExtension
          library_dirs += library_paths(device_type="cuda")
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/workspace/.venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1559, in library_paths
          if (not os.path.exists(_join_cuda_home(lib_dir)) and
                                 ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/workspace/.venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 2986, in _join_cuda_home
          raise OSError('CUDA_HOME environment variable is not set. '
      OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

      hint: This usually indicates a problem with the package or the build environment.

This is due to the library using "cpu" version of pytorch. Check your pytorch version with print(torch.__version__). If you had CUDA version installed, try installing with --no-deps:

pip install -e . --no-deps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions