Posted by : Arifah Nur Ainia

**********************************************************************

** Visual Studio 2022 Developer Command Prompt v17.10.4

** Copyright (c) 2022 Microsoft Corporation

**********************************************************************


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>pip install flash-attn

Collecting flash-attn

  Using cached flash_attn-2.6.1.tar.gz (2.6 MB)

  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

  ╰─> [20 lines of output]

      Traceback (most recent call last):

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>

          main()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\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 "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\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\DBABS\AppData\Local\Temp\pip-build-env-nqu091do\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel

          return self._get_build_requires(config_settings, requirements=[])

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Temp\pip-build-env-nqu091do\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires

          self.run_setup()

        File "C:\Users\DBABS\AppData\Local\Temp\pip-build-env-nqu091do\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup

          super().run_setup(setup_script=setup_script)

        File "C:\Users\DBABS\AppData\Local\Temp\pip-build-env-nqu091do\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup

          exec(code, locals())

        File "<string>", line 19, in <module>

      ModuleNotFoundError: No module named 'torch'

      [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.


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2024 NVIDIA Corporation

Built on Thu_Jun__6_03:03:05_Pacific_Daylight_Time_2024

Cuda compilation tools, release 12.5, V12.5.82

Build cuda_12.5.r12.5/compiler.34385749_0


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>cl

Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33812 for x86

Copyright (C) Microsoft Corporation.  All rights reserved.


usage: cl [ option... ] filename... [ /link linkoption... ]


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>python --version

Python 3.12.3


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>pip --version

pip 24.1.2 from C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>.\venv\Scripts\activate

The system cannot find the path specified.


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>cl

Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33812 for x86

Copyright (C) Microsoft Corporation.  All rights reserved.


usage: cl [ option... ] filename... [ /link linkoption... ]


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>python -c "import torch; print(torch.__version__)"

2.3.1+cu121


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>python -c "import torch; print('PyTorch version:', torch.__version__); print('CUDA available:', torch.cuda.is_available()); print('CUDA version:', torch.version.cuda)"

PyTorch version: 2.3.1+cu121

CUDA available: True

CUDA version: 12.1


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>python -c "import torch; print(torch.cuda.current_device()); print(torch.cuda.device(0)); print(torch.cuda.device_count()); print(torch.cuda.get_device_name(0))"

0

<torch.cuda.device object at 0x000001D53F6A2FF0>

1

NVIDIA GeForce RTX 3050 Laptop GPU


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>pip install flash-attn

Collecting flash-attn

  Using cached flash_attn-2.6.1.tar.gz (2.6 MB)

  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

  ╰─> [20 lines of output]

      Traceback (most recent call last):

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>

          main()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\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 "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\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\DBABS\AppData\Local\Temp\pip-build-env-51un85y_\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel

          return self._get_build_requires(config_settings, requirements=[])

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Temp\pip-build-env-51un85y_\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires

          self.run_setup()

        File "C:\Users\DBABS\AppData\Local\Temp\pip-build-env-51un85y_\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup

          super().run_setup(setup_script=setup_script)

        File "C:\Users\DBABS\AppData\Local\Temp\pip-build-env-51un85y_\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup

          exec(code, locals())

        File "<string>", line 19, in <module>

      ModuleNotFoundError: No module named 'torch'

      [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.


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>pip install flash-attn --no-build-

isolation

Collecting flash-attn

  Using cached flash_attn-2.6.1.tar.gz (2.6 MB)

  Preparing metadata (pyproject.toml) ... done

ERROR: Exception:

Traceback (most recent call last):

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\cli\base_command.py", line 179, in exc_logging_wrapper

    status = run_func(*args)

             ^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\cli\req_command.py", line 67, in wrapper

    return func(self, options, args)

           ^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run

    requirement_set = resolver.resolve(

                      ^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve

    result = self._result = resolver.resolve(

                            ^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve

    state = resolution.resolve(requirements, max_rounds=max_rounds)

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve

    self._add_to_criteria(self.state.criteria, r, parent=None)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria

    if not criterion.candidates:

           ^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__

    return bool(self._sequence)

           ^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 174, in __bool__

    return any(self)

           ^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 162, in <genexpr>

    return (c for c in iterator if id(c) not in self._incompatible_ids)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 53, in _iter_built

    candidate = func()

                ^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 185, in _make_candidate_from_link

    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(

                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 231, in _make_base_candidate_from_link

    self._link_candidate_cache[link] = LinkCandidate(

                                       ^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 303, in __init__

    super().__init__(

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 158, in __init__

    self.dist = self._prepare()

                ^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 235, in _prepare

    dist = self._prepare_distribution()

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 314, in _prepare_distribution

    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\operations\prepare.py", line 527, in prepare_linked_requirement

    return self._prepare_linked_requirement(req, parallel_builds)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\operations\prepare.py", line 642, in _prepare_linked_requirement

    dist = _get_prepared_distribution(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\operations\prepare.py", line 72, in _get_prepared_distribution

    abstract_dist.prepare_distribution_metadata(

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\distributions\sdist.py", line 69, in prepare_distribution_metadata

    self.req.prepare_metadata()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\req\req_install.py", line 574, in prepare_metadata

    self.metadata_directory = generate_metadata(

                              ^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\operations\build\metadata.py", line 35, in generate_metadata

    distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_internal\utils\misc.py", line 730, in prepare_metadata_for_build_wheel

    return super().prepare_metadata_for_build_wheel(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 186, in prepare_metadata_for_build_wheel

    return self._call_hook('prepare_metadata_for_build_wheel', {

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 321, in _call_hook

    raise BackendUnavailable(data.get('traceback', ''))

pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend

    obj = import_module(mod_path)

          ^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import

  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load

  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed

  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import

  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load

  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'setuptools'



C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>ls

'ls' is not recognized as an internal or external command,

operable program or batch file.


C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>cd C:\Users\DBABS\anaconda3\envs\flash-attention


C:\Users\DBABS\anaconda3\envs\flash-attention>python setup.py install

Traceback (most recent call last):

  File "C:\Users\DBABS\anaconda3\envs\flash-attention\setup.py", line 12, in <module>

    from setuptools import setup, find_packages

ModuleNotFoundError: No module named 'setuptools'


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install -r requirements.txt

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install setuptools wheel

Collecting setuptools

  Using cached setuptools-71.1.0-py3-none-any.whl.metadata (6.6 kB)

Collecting wheel

  Downloading wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)

Using cached setuptools-71.1.0-py3-none-any.whl (2.3 MB)

Downloading wheel-0.43.0-py3-none-any.whl (65 kB)

   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 237.3 kB/s eta 0:00:00

Installing collected packages: wheel, setuptools

Successfully installed setuptools-71.1.0 wheel-0.43.0


C:\Users\DBABS\anaconda3\envs\flash-attention>python setup.py install

Submodule 'csrc/cutlass' (https://github.com/NVIDIA/cutlass.git) registered for path 'csrc/cutlass'

Cloning into 'C:/Users/DBABS/anaconda3/envs/flash-attention/csrc/cutlass'...

remote: Enumerating objects: 18, done.

remote: Counting objects: 100% (18/18), done.

remote: Compressing objects: 100% (11/11), done.

remote: Total 18 (delta 7), reused 14 (delta 7), pack-reused 0

Unpacking objects: 100% (18/18), 93.65 KiB | 721.00 KiB/s, done.

From https://github.com/NVIDIA/cutlass

 * branch              756c351b4994854b2f8c6dded3821ebbb580876b -> FETCH_HEAD

Submodule path 'csrc/cutlass': checked out '756c351b4994854b2f8c6dded3821ebbb580876b'



torch.__version__  = 2.3.1+cu121



C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

!!


        ********************************************************************************

        Requirements should be satisfied by a PEP 517 installer.

        If you are using pip, you can try `pip install --use-pep517`.

        ********************************************************************************


!!

  dist.fetch_build_eggs(dist.setup_requires)

running install

C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.

!!


        ********************************************************************************

        Please avoid running ``setup.py`` directly.

        Instead, use pypa/build, pypa/installer or other

        standards-based tools.


        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.

        ********************************************************************************


!!

  self.initialize_options()

C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.

!!


        ********************************************************************************

        Please avoid running ``setup.py`` and ``easy_install``.

        Instead, use pypa/build, pypa/installer or other

        standards-based tools.


        See https://github.com/pypa/setuptools/issues/917 for details.

        ********************************************************************************


!!

  self.initialize_options()

running bdist_egg

running egg_info

creating flash_attn.egg-info

writing flash_attn.egg-info\PKG-INFO

writing dependency_links to flash_attn.egg-info\dependency_links.txt

writing requirements to flash_attn.egg-info\requires.txt

writing top-level names to flash_attn.egg-info\top_level.txt

writing manifest file 'flash_attn.egg-info\SOURCES.txt'

reading manifest file 'flash_attn.egg-info\SOURCES.txt'

reading manifest template 'MANIFEST.in'

warning: no files found matching '*.cu' under directory 'flash_attn'

warning: no files found matching '*.h' under directory 'flash_attn'

warning: no files found matching '*.cuh' under directory 'flash_attn'

warning: no files found matching '*.cpp' under directory 'flash_attn'

warning: no files found matching '*.hpp' under directory 'flash_attn'

adding license file 'LICENSE'

adding license file 'AUTHORS'

writing manifest file 'flash_attn.egg-info\SOURCES.txt'

installing library code to build\bdist.win32\egg

running install_lib

running build_py

creating build

creating build\lib.win32-cpython-312

creating build\lib.win32-cpython-312\flash_attn

copying flash_attn\bert_padding.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_attn_interface.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_attn_triton.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_attn_triton_og.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_blocksparse_attention.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_blocksparse_attn_interface.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\fused_softmax.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\__init__.py -> build\lib.win32-cpython-312\flash_attn

creating build\lib.win32-cpython-312\hopper

copying hopper\flash_attn_interface.py -> build\lib.win32-cpython-312\hopper

copying hopper\setup.py -> build\lib.win32-cpython-312\hopper

copying hopper\test_flash_attn.py -> build\lib.win32-cpython-312\hopper

copying hopper\__init__.py -> build\lib.win32-cpython-312\hopper

creating build\lib.win32-cpython-312\flash_attn\layers

copying flash_attn\layers\patch_embed.py -> build\lib.win32-cpython-312\flash_attn\layers

copying flash_attn\layers\rotary.py -> build\lib.win32-cpython-312\flash_attn\layers

copying flash_attn\layers\__init__.py -> build\lib.win32-cpython-312\flash_attn\layers

creating build\lib.win32-cpython-312\flash_attn\losses

copying flash_attn\losses\cross_entropy.py -> build\lib.win32-cpython-312\flash_attn\losses

copying flash_attn\losses\__init__.py -> build\lib.win32-cpython-312\flash_attn\losses

creating build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\baichuan.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\bert.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\bigcode.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\btlm.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\falcon.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\gpt.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\gptj.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\gpt_neox.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\llama.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\opt.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\vit.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\__init__.py -> build\lib.win32-cpython-312\flash_attn\models

creating build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\block.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\embedding.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\mha.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\mlp.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\__init__.py -> build\lib.win32-cpython-312\flash_attn\modules

creating build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\activations.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\fused_dense.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\layer_norm.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\rms_norm.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\__init__.py -> build\lib.win32-cpython-312\flash_attn\ops

creating build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\benchmark.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\distributed.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\generation.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\pretrained.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\__init__.py -> build\lib.win32-cpython-312\flash_attn\utils

creating build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\cross_entropy.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\k_activations.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\layer_norm.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\linear.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\mlp.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\rotary.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\__init__.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

running build_ext

Traceback (most recent call last):

  File "C:\Users\DBABS\anaconda3\envs\flash-attention\setup.py", line 344, in <module>

    setup(

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 108, in setup

    return distutils.core.setup(**attrs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup

    return run_commands(dist)

           ^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands

    dist.run_commands()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 970, in run_commands

    self.run_command(cmd)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\install.py", line 92, in run

    self.do_egg_install()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\install.py", line 144, in do_egg_install

    self.run_command('bdist_egg')

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command

    self.distribution.run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\bdist_egg.py", line 167, in run

    cmd = self.call_command('install_lib', warn_dir=False)

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\bdist_egg.py", line 153, in call_command

    self.run_command(cmdname)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command

    self.distribution.run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\install_lib.py", line 13, in run

    self.build()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\command\install_lib.py", line 110, in build

    self.run_command('build_ext')

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command

    self.distribution.run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\build_ext.py", line 93, in run

    _build_ext.run(self)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run

    self.build_extensions()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\cpp_extension.py", line 508, in build_extensions

    compiler_name, compiler_version = self._check_abi()

                                      ^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\cpp_extension.py", line 900, in _check_abi

    raise UserWarning(msg)

UserWarning: It seems that the VC environment is activated but DISTUTILS_USE_SDK is not set.This may lead to multiple activations of the VC env.Please set `DISTUTILS_USE_SDK=1` and try again.


C:\Users\DBABS\anaconda3\envs\flash-attention>pip list

Package                  Version

------------------------ --------------

attrs                    23.2.0

cachetools               5.3.3

certifi                  2024.2.2

cffi                     1.16.0

charset-normalizer       3.3.2

chromedriver-binary      127.0.6487.0.0

filelock                 3.13.1

fsspec                   2024.2.0

google-api-core          2.19.0

google-api-python-client 2.129.0

google-auth              2.29.0

google-auth-httplib2     0.2.0

google-auth-oauthlib     1.2.0

googleapis-common-protos 1.63.0

h11                      0.14.0

httplib2                 0.22.0

idna                     3.7

intel-openmp             2021.4.0

Jinja2                   3.1.3

MarkupSafe               2.1.5

mkl                      2021.4.0

mpmath                   1.3.0

networkx                 3.2.1

numpy                    2.0.0

oauthlib                 3.2.2

opencv-python            4.10.0.84

outcome                  1.3.0.post0

packaging                24.0

pillow                   10.3.0

pip                      24.1.2

proto-plus               1.23.0

protobuf                 4.25.3

pyasn1                   0.6.0

pyasn1_modules           0.4.0

pycparser                2.22

pyparsing                3.1.2

PySocks                  1.7.1

pytesseract              0.3.10

requests                 2.31.0

requests-oauthlib        2.0.0

rsa                      4.9

selenium                 4.21.0

setuptools               71.1.0

sniffio                  1.3.1

sortedcontainers         2.4.0

sympy                    1.12

tbb                      2021.11.0

torch                    2.3.1+cu121

torchaudio               2.3.1+cu121

torchvision              0.18.1+cu121

trio                     0.25.1

trio-websocket           0.11.1

typing_extensions        4.11.0

uritemplate              4.1.1

urllib3                  2.2.1

wheel                    0.43.0

wsproto                  1.2.0


C:\Users\DBABS\anaconda3\envs\flash-attention>pip show

WARNING: ERROR: Please provide a package name or names.


C:\Users\DBABS\anaconda3\envs\flash-attention>python -c "import flash_attn; print('flash-attn is

installed')"

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "C:\Users\DBABS\anaconda3\envs\flash-attention\flash_attn\__init__.py", line 3, in <module>

    from flash_attn.flash_attn_interface import (

  File "C:\Users\DBABS\anaconda3\envs\flash-attention\flash_attn\flash_attn_interface.py", line 10, in <module>

    import flash_attn_2_cuda as flash_attn_cuda

ModuleNotFoundError: No module named 'flash_attn_2_cuda'


C:\Users\DBABS\anaconda3\envs\flash-attention>pip show flash-attn

WARNING: Package(s) not found: flash-attn


C:\Users\DBABS\anaconda3\envs\flash-attention>python setup.py install



torch.__version__  = 2.3.1+cu121



C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

!!


        ********************************************************************************

        Requirements should be satisfied by a PEP 517 installer.

        If you are using pip, you can try `pip install --use-pep517`.

        ********************************************************************************


!!

  dist.fetch_build_eggs(dist.setup_requires)

Traceback (most recent call last):

  File "C:\Users\DBABS\anaconda3\envs\flash-attention\setup.py", line 344, in <module>

    setup(

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 107, in setup

    _install_setup_requires(attrs)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires

    _fetch_build_eggs(dist)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs

    dist.fetch_build_eggs(dist.setup_requires)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 623, in fetch_build_eggs

    return _fetch_build_eggs(self, requires)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs

    resolved_dists = pkg_resources.working_set.resolve(

                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 896, in resolve

    dist = self._resolve_dist(

           ^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 932, in _resolve_dist

    dist = best[req.key] = env.best_match(

                           ^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1262, in best_match

    return self.obtain(req, installer)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1298, in obtain

    return installer(requirement) if installer else None

           ^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 106, in _fetch_build_egg_no_warn

    wheel.install_as_egg(dist_location)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 123, in install_as_egg

    self._install_as_egg(destination_eggdir, zf)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 131, in _install_as_egg

    self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 176, in _convert_metadata

    os.rename(dist_info, egg_info)

FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\DBABS\\anaconda3\\envs\\flash-attention\\.eggs\\ninja-1.11.1.1-py3.12-win32.egg\\ninja-1.11.1.1.dist-info' -> 'C:\\Users\\DBABS\\anaconda3\\envs\\flash-attention\\.eggs\\ninja-1.11.1.1-py3.12-win32.egg\\EGG-INFO'


C:\Users\DBABS\anaconda3\envs\flash-attention>pip show flash-attn

WARNING: Package(s) not found: flash-attn


C:\Users\DBABS\anaconda3\envs\flash-attention>pip show flash-attn

WARNING: Package(s) not found: flash-attn


C:\Users\DBABS\anaconda3\envs\flash-attention>pip list

Package                  Version

------------------------ --------------

attrs                    23.2.0

cachetools               5.3.3

certifi                  2024.2.2

cffi                     1.16.0

charset-normalizer       3.3.2

chromedriver-binary      127.0.6487.0.0

filelock                 3.13.1

fsspec                   2024.2.0

google-api-core          2.19.0

google-api-python-client 2.129.0

google-auth              2.29.0

google-auth-httplib2     0.2.0

google-auth-oauthlib     1.2.0

googleapis-common-protos 1.63.0

h11                      0.14.0

httplib2                 0.22.0

idna                     3.7

intel-openmp             2021.4.0

Jinja2                   3.1.3

MarkupSafe               2.1.5

mkl                      2021.4.0

mpmath                   1.3.0

networkx                 3.2.1

numpy                    2.0.0

oauthlib                 3.2.2

opencv-python            4.10.0.84

outcome                  1.3.0.post0

packaging                24.0

pillow                   10.3.0

pip                      24.1.2

proto-plus               1.23.0

protobuf                 4.25.3

pyasn1                   0.6.0

pyasn1_modules           0.4.0

pycparser                2.22

pyparsing                3.1.2

PySocks                  1.7.1

pytesseract              0.3.10

requests                 2.31.0

requests-oauthlib        2.0.0

rsa                      4.9

selenium                 4.21.0

setuptools               71.1.0

sniffio                  1.3.1

sortedcontainers         2.4.0

sympy                    1.12

tbb                      2021.11.0

torch                    2.3.1+cu121

torchaudio               2.3.1+cu121

torchvision              0.18.1+cu121

trio                     0.25.1

trio-websocket           0.11.1

typing_extensions        4.11.0

uritemplate              4.1.1

urllib3                  2.2.1

wheel                    0.43.0

wsproto                  1.2.0


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --use-pep517

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip3 install --use-pep517

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install ninja

Collecting ninja

  Using cached ninja-1.11.1.1-py2.py3-none-win_amd64.whl.metadata (5.4 kB)

Using cached ninja-1.11.1.1-py2.py3-none-win_amd64.whl (312 kB)

Installing collected packages: ninja

Successfully installed ninja-1.11.1.1


C:\Users\DBABS\anaconda3\envs\flash-attention>python setup.py install



torch.__version__  = 2.3.1+cu121



C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

!!


        ********************************************************************************

        Requirements should be satisfied by a PEP 517 installer.

        If you are using pip, you can try `pip install --use-pep517`.

        ********************************************************************************


!!

  dist.fetch_build_eggs(dist.setup_requires)

running install

C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.

!!


        ********************************************************************************

        Please avoid running ``setup.py`` directly.

        Instead, use pypa/build, pypa/installer or other

        standards-based tools.


        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.

        ********************************************************************************


!!

  self.initialize_options()

C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.

!!


        ********************************************************************************

        Please avoid running ``setup.py`` and ``easy_install``.

        Instead, use pypa/build, pypa/installer or other

        standards-based tools.


        See https://github.com/pypa/setuptools/issues/917 for details.

        ********************************************************************************


!!

  self.initialize_options()

running bdist_egg

running egg_info

writing flash_attn.egg-info\PKG-INFO

writing dependency_links to flash_attn.egg-info\dependency_links.txt

writing requirements to flash_attn.egg-info\requires.txt

writing top-level names to flash_attn.egg-info\top_level.txt

reading manifest file 'flash_attn.egg-info\SOURCES.txt'

reading manifest template 'MANIFEST.in'

warning: no files found matching '*.cu' under directory 'flash_attn'

warning: no files found matching '*.h' under directory 'flash_attn'

warning: no files found matching '*.cuh' under directory 'flash_attn'

warning: no files found matching '*.cpp' under directory 'flash_attn'

warning: no files found matching '*.hpp' under directory 'flash_attn'

adding license file 'LICENSE'

adding license file 'AUTHORS'

writing manifest file 'flash_attn.egg-info\SOURCES.txt'

installing library code to build\bdist.win32\egg

running install_lib

running build_py

copying flash_attn\bert_padding.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_attn_interface.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_attn_triton.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_attn_triton_og.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_blocksparse_attention.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\flash_blocksparse_attn_interface.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\fused_softmax.py -> build\lib.win32-cpython-312\flash_attn

copying flash_attn\__init__.py -> build\lib.win32-cpython-312\flash_attn

copying hopper\flash_attn_interface.py -> build\lib.win32-cpython-312\hopper

copying hopper\setup.py -> build\lib.win32-cpython-312\hopper

copying hopper\test_flash_attn.py -> build\lib.win32-cpython-312\hopper

copying hopper\__init__.py -> build\lib.win32-cpython-312\hopper

copying flash_attn\layers\patch_embed.py -> build\lib.win32-cpython-312\flash_attn\layers

copying flash_attn\layers\rotary.py -> build\lib.win32-cpython-312\flash_attn\layers

copying flash_attn\layers\__init__.py -> build\lib.win32-cpython-312\flash_attn\layers

copying flash_attn\losses\cross_entropy.py -> build\lib.win32-cpython-312\flash_attn\losses

copying flash_attn\losses\__init__.py -> build\lib.win32-cpython-312\flash_attn\losses

copying flash_attn\models\baichuan.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\bert.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\bigcode.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\btlm.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\falcon.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\gpt.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\gptj.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\gpt_neox.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\llama.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\opt.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\vit.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\models\__init__.py -> build\lib.win32-cpython-312\flash_attn\models

copying flash_attn\modules\block.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\embedding.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\mha.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\mlp.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\modules\__init__.py -> build\lib.win32-cpython-312\flash_attn\modules

copying flash_attn\ops\activations.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\fused_dense.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\layer_norm.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\rms_norm.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\ops\__init__.py -> build\lib.win32-cpython-312\flash_attn\ops

copying flash_attn\utils\benchmark.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\distributed.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\generation.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\pretrained.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\utils\__init__.py -> build\lib.win32-cpython-312\flash_attn\utils

copying flash_attn\ops\triton\cross_entropy.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\k_activations.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\layer_norm.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\linear.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\mlp.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\rotary.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

copying flash_attn\ops\triton\__init__.py -> build\lib.win32-cpython-312\flash_attn\ops\triton

running build_ext

Traceback (most recent call last):

  File "C:\Users\DBABS\anaconda3\envs\flash-attention\setup.py", line 344, in <module>

    setup(

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 108, in setup

    return distutils.core.setup(**attrs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup

    return run_commands(dist)

           ^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands

    dist.run_commands()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 970, in run_commands

    self.run_command(cmd)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\install.py", line 92, in run

    self.do_egg_install()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\install.py", line 144, in do_egg_install

    self.run_command('bdist_egg')

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command

    self.distribution.run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\bdist_egg.py", line 167, in run

    cmd = self.call_command('install_lib', warn_dir=False)

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\bdist_egg.py", line 153, in call_command

    self.run_command(cmdname)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command

    self.distribution.run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\install_lib.py", line 13, in run

    self.build()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\command\install_lib.py", line 110, in build

    self.run_command('build_ext')

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command

    self.distribution.run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

    super().run_command(command)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

    cmd_obj.run()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\build_ext.py", line 93, in run

    _build_ext.run(self)

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run

    self.build_extensions()

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\cpp_extension.py", line 508, in build_extensions

    compiler_name, compiler_version = self._check_abi()

                                      ^^^^^^^^^^^^^^^^^

  File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\cpp_extension.py", line 900, in _check_abi

    raise UserWarning(msg)

UserWarning: It seems that the VC environment is activated but DISTUTILS_USE_SDK is not set.This may lead to multiple activations of the VC env.Please set `DISTUTILS_USE_SDK=1` and try again.


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --use-pep517

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --upgrade setuptools pip

Requirement already satisfied: setuptools in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (71.1.0)

Requirement already satisfied: pip in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (24.1.2)


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --use-pep517

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --upgrade pip setuptools

Requirement already satisfied: pip in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (24.1.2)

Requirement already satisfied: setuptools in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (71.1.0)


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --use-pep517

ERROR: You must give at least one requirement to install (see "pip help install")


C:\Users\DBABS\anaconda3\envs\flash-attention>pip show flash-attn

WARNING: Package(s) not found: flash-attn


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install flash-attn --no-build-isolation

Collecting flash-attn

  Using cached flash_attn-2.6.1.tar.gz (2.6 MB)

  Preparing metadata (setup.py) ... done

Requirement already satisfied: torch in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from flash-attn) (2.3.1+cu121)

Collecting einops (from flash-attn)

  Using cached einops-0.8.0-py3-none-any.whl.metadata (12 kB)

Requirement already satisfied: filelock in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (3.13.1)

Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (4.11.0)

Requirement already satisfied: sympy in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (1.12)

Requirement already satisfied: networkx in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (3.2.1)

Requirement already satisfied: jinja2 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (3.1.3)

Requirement already satisfied: fsspec in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (2024.2.0)

Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (2021.4.0)

Requirement already satisfied: intel-openmp==2021.* in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch->flash-attn) (2021.4.0)

Requirement already satisfied: tbb==2021.* in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch->flash-attn) (2021.11.0)

Requirement already satisfied: MarkupSafe>=2.0 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from jinja2->torch->flash-attn) (2.1.5)

Requirement already satisfied: mpmath>=0.19 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from sympy->torch->flash-attn) (1.3.0)

Using cached einops-0.8.0-py3-none-any.whl (43 kB)

Building wheels for collected packages: flash-attn

  Building wheel for flash-attn (setup.py) ... error

  error: subprocess-exited-with-error


  × python setup.py bdist_wheel did not run successfully.

  │ exit code: 1

  ╰─> [54 lines of output]

      fatal: not a git repository (or any of the parent directories): .git



      torch.__version__  = 2.3.1+cu121



      C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

      !!


              ********************************************************************************

              Requirements should be satisfied by a PEP 517 installer.

              If you are using pip, you can try `pip install --use-pep517`.

              ********************************************************************************


      !!

        dist.fetch_build_eggs(dist.setup_requires)

      Traceback (most recent call last):

        File "<string>", line 2, in <module>

        File "<pip-setuptools-caller>", line 34, in <module>

        File "C:\Users\DBABS\AppData\Local\Temp\pip-install-25auj97m\flash-attn_c6a4a3a8b2f6436b81dd435d56fdfda2\setup.py", line 344, in <module>

          setup(

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 107, in setup

          _install_setup_requires(attrs)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires

          _fetch_build_eggs(dist)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs

          dist.fetch_build_eggs(dist.setup_requires)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 623, in fetch_build_eggs

          return _fetch_build_eggs(self, requires)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs

          resolved_dists = pkg_resources.working_set.resolve(

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 896, in resolve

          dist = self._resolve_dist(

                 ^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 932, in _resolve_dist

          dist = best[req.key] = env.best_match(

                                 ^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1262, in best_match

          return self.obtain(req, installer)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1298, in obtain

          return installer(requirement) if installer else None

                 ^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 106, in _fetch_build_egg_no_warn

          wheel.install_as_egg(dist_location)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 123, in install_as_egg

          self._install_as_egg(destination_eggdir, zf)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 131, in _install_as_egg

          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 176, in _convert_metadata

          os.rename(dist_info, egg_info)

      FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-25auj97m\\flash-attn_c6a4a3a8b2f6436b81dd435d56fdfda2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\psutil-6.0.0.dist-info' -> 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-25auj97m\\flash-attn_c6a4a3a8b2f6436b81dd435d56fdfda2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\EGG-INFO'

      [end of output]


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

  ERROR: Failed building wheel for flash-attn

  Running setup.py clean for flash-attn

  error: subprocess-exited-with-error


  × python setup.py clean did not run successfully.

  │ exit code: 1

  ╰─> [54 lines of output]

      fatal: not a git repository (or any of the parent directories): .git



      torch.__version__  = 2.3.1+cu121



      C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

      !!


              ********************************************************************************

              Requirements should be satisfied by a PEP 517 installer.

              If you are using pip, you can try `pip install --use-pep517`.

              ********************************************************************************


      !!

        dist.fetch_build_eggs(dist.setup_requires)

      Traceback (most recent call last):

        File "<string>", line 2, in <module>

        File "<pip-setuptools-caller>", line 34, in <module>

        File "C:\Users\DBABS\AppData\Local\Temp\pip-install-25auj97m\flash-attn_c6a4a3a8b2f6436b81dd435d56fdfda2\setup.py", line 344, in <module>

          setup(

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 107, in setup

          _install_setup_requires(attrs)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires

          _fetch_build_eggs(dist)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs

          dist.fetch_build_eggs(dist.setup_requires)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 623, in fetch_build_eggs

          return _fetch_build_eggs(self, requires)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs

          resolved_dists = pkg_resources.working_set.resolve(

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 896, in resolve

          dist = self._resolve_dist(

                 ^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 932, in _resolve_dist

          dist = best[req.key] = env.best_match(

                                 ^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1262, in best_match

          return self.obtain(req, installer)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1298, in obtain

          return installer(requirement) if installer else None

                 ^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 106, in _fetch_build_egg_no_warn

          wheel.install_as_egg(dist_location)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 123, in install_as_egg

          self._install_as_egg(destination_eggdir, zf)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 131, in _install_as_egg

          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 176, in _convert_metadata

          os.rename(dist_info, egg_info)

      FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-25auj97m\\flash-attn_c6a4a3a8b2f6436b81dd435d56fdfda2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\psutil-6.0.0.dist-info' -> 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-25auj97m\\flash-attn_c6a4a3a8b2f6436b81dd435d56fdfda2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\EGG-INFO'

      [end of output]


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

  ERROR: Failed cleaning build dir for flash-attn

Failed to build flash-attn

ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (flash-attn)


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install flash-attn --use-pep517 --no-build-isolation

Collecting flash-attn

  Using cached flash_attn-2.6.1.tar.gz (2.6 MB)

  Preparing metadata (pyproject.toml) ... error

  error: subprocess-exited-with-error


  × Preparing metadata (pyproject.toml) did not run successfully.

  │ exit code: 1

  ╰─> [68 lines of output]

      fatal: not a git repository (or any of the parent directories): .git



      torch.__version__  = 2.3.1+cu121



      running dist_info

      creating C:\Users\DBABS\AppData\Local\Temp\pip-modern-metadata-05alvzct\flash_attn.egg-info

      writing C:\Users\DBABS\AppData\Local\Temp\pip-modern-metadata-05alvzct\flash_attn.egg-info\PKG-INFO

      writing dependency_links to C:\Users\DBABS\AppData\Local\Temp\pip-modern-metadata-05alvzct\flash_attn.egg-info\dependency_links.txt

      writing requirements to C:\Users\DBABS\AppData\Local\Temp\pip-modern-metadata-05alvzct\flash_attn.egg-info\requires.txt

      writing top-level names to C:\Users\DBABS\AppData\Local\Temp\pip-modern-metadata-05alvzct\flash_attn.egg-info\top_level.txt

      writing manifest file 'C:\Users\DBABS\AppData\Local\Temp\pip-modern-metadata-05alvzct\flash_attn.egg-info\SOURCES.txt'

      Traceback (most recent call last):

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>

          main()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\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 "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel

          return hook(metadata_directory, config_settings)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\build_meta.py", line 368, in prepare_metadata_for_build_wheel

          self.run_setup()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup

          super().run_setup(setup_script=setup_script)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup

          exec(code, locals())

        File "<string>", line 344, in <module>

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 108, in setup

          return distutils.core.setup(**attrs)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup

          return run_commands(dist)

                 ^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands

          dist.run_commands()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 970, in run_commands

          self.run_command(cmd)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 956, in run_command

          super().run_command(command)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command

          cmd_obj.run()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\dist_info.py", line 92, in run

          self.egg_info.run()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\egg_info.py", line 310, in run

          self.find_sources()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\egg_info.py", line 318, in find_sources

          mm.run()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\egg_info.py", line 539, in run

          self.add_defaults()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\egg_info.py", line 577, in add_defaults

          sdist.add_defaults(self)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\command\sdist.py", line 102, in add_defaults

          super().add_defaults()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 250, in add_defaults

          self._add_defaults_ext()

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 334, in _add_defaults_ext

          build_ext = self.get_finalized_command('build_ext')

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\cmd.py", line 302, in get_finalized_command

          cmd_obj = self.distribution.get_command_obj(command, create)

                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_distutils\dist.py", line 863, in get_command_obj

          cmd_obj = self.command_obj[command] = klass(self)

                                                ^^^^^^^^^^^

        File "<string>", line 328, in __init__

      ModuleNotFoundError: No module named 'psutil'

      [end of output]


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

error: metadata-generation-failed


× Encountered error while generating package metadata.

╰─> See above for output.


note: This is an issue with the package mentioned above, not pip.

hint: See above for details.


C:\Users\DBABS\anaconda3\envs\flash-attention>rmdir /s /q %TEMP%\pip-install-*

The filename, directory name, or volume label syntax is incorrect.


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install --upgrade setuptools wheel pip

Requirement already satisfied: setuptools in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (71.1.0)

Requirement already satisfied: wheel in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (0.43.0)

Requirement already satisfied: pip in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (24.1.2)


C:\Users\DBABS\anaconda3\envs\flash-attention>pip install flash-attn --no-build-isolation

Collecting flash-attn

  Using cached flash_attn-2.6.1.tar.gz (2.6 MB)

  Preparing metadata (setup.py) ... done

Requirement already satisfied: torch in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from flash-attn) (2.3.1+cu121)

Collecting einops (from flash-attn)

  Using cached einops-0.8.0-py3-none-any.whl.metadata (12 kB)

Requirement already satisfied: filelock in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (3.13.1)

Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (4.11.0)

Requirement already satisfied: sympy in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (1.12)

Requirement already satisfied: networkx in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (3.2.1)

Requirement already satisfied: jinja2 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (3.1.3)

Requirement already satisfied: fsspec in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (2024.2.0)

Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from torch->flash-attn) (2021.4.0)

Requirement already satisfied: intel-openmp==2021.* in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch->flash-attn) (2021.4.0)

Requirement already satisfied: tbb==2021.* in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch->flash-attn) (2021.11.0)

Requirement already satisfied: MarkupSafe>=2.0 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from jinja2->torch->flash-attn) (2.1.5)

Requirement already satisfied: mpmath>=0.19 in c:\users\dbabs\appdata\local\programs\python\python312\lib\site-packages (from sympy->torch->flash-attn) (1.3.0)

Using cached einops-0.8.0-py3-none-any.whl (43 kB)

Building wheels for collected packages: flash-attn

  Building wheel for flash-attn (setup.py) ... error

  error: subprocess-exited-with-error


  × python setup.py bdist_wheel did not run successfully.

  │ exit code: 1

  ╰─> [54 lines of output]

      fatal: not a git repository (or any of the parent directories): .git



      torch.__version__  = 2.3.1+cu121



      C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

      !!


              ********************************************************************************

              Requirements should be satisfied by a PEP 517 installer.

              If you are using pip, you can try `pip install --use-pep517`.

              ********************************************************************************


      !!

        dist.fetch_build_eggs(dist.setup_requires)

      Traceback (most recent call last):

        File "<string>", line 2, in <module>

        File "<pip-setuptools-caller>", line 34, in <module>

        File "C:\Users\DBABS\AppData\Local\Temp\pip-install-j_cd2oq_\flash-attn_76a9b837759b467fa7fa0625111778b2\setup.py", line 344, in <module>

          setup(

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 107, in setup

          _install_setup_requires(attrs)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires

          _fetch_build_eggs(dist)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs

          dist.fetch_build_eggs(dist.setup_requires)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 623, in fetch_build_eggs

          return _fetch_build_eggs(self, requires)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs

          resolved_dists = pkg_resources.working_set.resolve(

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 896, in resolve

          dist = self._resolve_dist(

                 ^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 932, in _resolve_dist

          dist = best[req.key] = env.best_match(

                                 ^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1262, in best_match

          return self.obtain(req, installer)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1298, in obtain

          return installer(requirement) if installer else None

                 ^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 106, in _fetch_build_egg_no_warn

          wheel.install_as_egg(dist_location)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 123, in install_as_egg

          self._install_as_egg(destination_eggdir, zf)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 131, in _install_as_egg

          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 176, in _convert_metadata

          os.rename(dist_info, egg_info)

      FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-j_cd2oq_\\flash-attn_76a9b837759b467fa7fa0625111778b2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\psutil-6.0.0.dist-info' -> 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-j_cd2oq_\\flash-attn_76a9b837759b467fa7fa0625111778b2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\EGG-INFO'

      [end of output]


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

  ERROR: Failed building wheel for flash-attn

  Running setup.py clean for flash-attn

  error: subprocess-exited-with-error


  × python setup.py clean did not run successfully.

  │ exit code: 1

  ╰─> [54 lines of output]

      fatal: not a git repository (or any of the parent directories): .git



      torch.__version__  = 2.3.1+cu121



      C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

      !!


              ********************************************************************************

              Requirements should be satisfied by a PEP 517 installer.

              If you are using pip, you can try `pip install --use-pep517`.

              ********************************************************************************


      !!

        dist.fetch_build_eggs(dist.setup_requires)

      Traceback (most recent call last):

        File "<string>", line 2, in <module>

        File "<pip-setuptools-caller>", line 34, in <module>

        File "C:\Users\DBABS\AppData\Local\Temp\pip-install-j_cd2oq_\flash-attn_76a9b837759b467fa7fa0625111778b2\setup.py", line 344, in <module>

          setup(

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 107, in setup

          _install_setup_requires(attrs)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires

          _fetch_build_eggs(dist)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs

          dist.fetch_build_eggs(dist.setup_requires)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\dist.py", line 623, in fetch_build_eggs

          return _fetch_build_eggs(self, requires)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs

          resolved_dists = pkg_resources.working_set.resolve(

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 896, in resolve

          dist = self._resolve_dist(

                 ^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 932, in _resolve_dist

          dist = best[req.key] = env.best_match(

                                 ^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1262, in best_match

          return self.obtain(req, installer)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources\__init__.py", line 1298, in obtain

          return installer(requirement) if installer else None

                 ^^^^^^^^^^^^^^^^^^^^^^

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\installer.py", line 106, in _fetch_build_egg_no_warn

          wheel.install_as_egg(dist_location)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 123, in install_as_egg

          self._install_as_egg(destination_eggdir, zf)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 131, in _install_as_egg

          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

        File "C:\Users\DBABS\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\wheel.py", line 176, in _convert_metadata

          os.rename(dist_info, egg_info)

      FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-j_cd2oq_\\flash-attn_76a9b837759b467fa7fa0625111778b2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\psutil-6.0.0.dist-info' -> 'C:\\Users\\DBABS\\AppData\\Local\\Temp\\pip-install-j_cd2oq_\\flash-attn_76a9b837759b467fa7fa0625111778b2\\.eggs\\psutil-6.0.0-py3.12-win32.egg\\EGG-INFO'

      [end of output]


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

  ERROR: Failed cleaning build dir for flash-attn

Failed to build flash-attn

ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (flash-attn)


C:\Users\DBABS\anaconda3\envs\flash-attention>

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Whatever I Don't Care - Hatsune Miku - Powered by Blogger - Designed by Johanes Djogan -