Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subprocess.CalledProcessError: Command '['path/to/cuda-11.7/bin/nvcc', '-V']' returned non-zero exit status 255 #1447

Open
ChosenOne-xx opened this issue Jan 16, 2025 · 0 comments

Comments

@ChosenOne-xx
Copy link

when I pip install flash-attn==2.3.2, I encounter the error:

Collecting flash-attn==2.3.2
Using cached flash_attn-2.3.2.tar.gz (2.3 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
fatal: 不是 git 仓库(或者任何父目录):.git
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-scguzyaj/flash-attn_005ea1320f3541e29f263d6aefd02a9d/setup.py", line 115, in
_, bare_metal_version = get_cuda_bare_metal_version(CUDA_HOME)
File "/tmp/pip-install-scguzyaj/flash-attn_005ea1320f3541e29f263d6aefd02a9d/setup.py", line 66, in get_cuda_bare_metal_version
raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
File "/home/zhangxu/anaconda3/envs/sparsedrive/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/home/zhangxu/anaconda3/envs/sparsedrive/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/zhangxu/cuda/cuda-11.7/bin/nvcc', '-V']' returned non-zero exit status 255.

  torch.__version__  = 1.13.0+cu117
  
  
  [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.

I have checked my cuda as following:

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:49:14_PDT_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0

which nvcc
/home/zhangxu/cuda/cuda-11.7/bin/nvcc

echo $CUDA_HOME
/home/zhangxu/cuda/cuda-11.7

It seems right. I dont understand what's wrong with my envs, can you help me? Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant