flash_attn安装出现的错误及本地安装package

前言

flash_attn安装包是在大模型的建立过程中是一个非常重要的package,但是直接使用命令行安装会出现报错。


1. 报错

直接安装:

pip install flash_attn

错误:
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
╰─> [73 lines of output]
fatal: not a git repository (or any of the parent directories): .git

warnings.warn(f’Error checking compiler version for {compiler}: {error}')
building ‘flash_attn_2_cuda’ extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

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

你可能感兴趣的:(人工智能,深度学习,经验分享)