[GH-ISSUE #1026] [Bug] No such file or directory: ':/usr/local/cuda:/usr/local/cuda:/usr/local/cuda/bin/nvcc' #729

Closed
opened 2026-10-29 14:43:36 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Colacalc on GitHub (Apr 3, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1026

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed.
  • 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed.

Describe the bug

I have tried multiple versions of Ubuntu, CUDA, and PyTorch, but I still can't compile from the source code. I encountered the following errors.

FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda:/usr/local/cuda:/usr/local/cuda/bin/nvcc'
error: subprocess-exited-with-error

Reproduction

sudo apt install gcc
install drivers and cuda

pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
conda create -n ktrans python=3.12
conda activate ktrans
conda install -c conda-forge libstdcxx-ng
strings ~/anaconda3/envs/ktransformers/lib/libstdc++.so.6 | grep GLIBCXX
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip3 install packaging ninja cpufeature numpy
git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule init
git submodule update
git submodule update --init --recursive
pip3 install flash_attn --verbose

An error occurred, so I downloaded the compiled files from GitHub. The library address is as follows: https://github.com/Dao-AILab/flash-attention/releases/tag/v2.7.4.post1

sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf

Environment

Environment

6554S*1

4090 48G
ubuntu 22.04.3
miniconda py 3.12
NVIDIA drivers 550
CUDA TOOLKIT 12.4
Torch2.6.0 and 2.4.0
ktransformers 0.2.4

Based on other people's experiences, I also tried to execute the following commands.
sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf .

Originally created by @Colacalc on GitHub (Apr 3, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1026 ### Checklist - [x] 1. I have searched related issues but cannot get the expected help. - [x] 2. The bug has not been fixed in the latest version. - [x] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback. - [x] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed. - [x] 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed. ### Describe the bug I have tried multiple versions of Ubuntu, CUDA, and PyTorch, but I still can't compile from the source code. I encountered the following errors. FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda:/usr/local/cuda:/usr/local/cuda/bin/nvcc' error: subprocess-exited-with-error ### Reproduction sudo apt install gcc install drivers and cuda pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple conda create -n ktrans python=3.12 conda activate ktrans conda install -c conda-forge libstdcxx-ng strings ~/anaconda3/envs/ktransformers/lib/libstdc++.so.6 | grep GLIBCXX pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 pip3 install packaging ninja cpufeature numpy git clone https://github.com/kvcache-ai/ktransformers.git cd ktransformers git submodule init git submodule update git submodule update --init --recursive pip3 install flash_attn --verbose ## An error occurred, so I downloaded the compiled files from GitHub. The library address is as follows: https://github.com/Dao-AILab/flash-attention/releases/tag/v2.7.4.post1 sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf ### Environment # Environment 6554S*1 4090 48G ubuntu 22.04.3 miniconda py 3.12 NVIDIA drivers 550 CUDA TOOLKIT 12.4 Torch2.6.0 and 2.4.0 ktransformers 0.2.4 Based on other people's experiences, I also tried to execute the following commands. sudo apt install libtbb-dev libssl-dev libcurl4-openssl-dev libaio-dev libfmt-dev libgflags-dev zlib1g-dev patchelf .
Author
Owner

@CYSTEV-chn commented on GitHub (Apr 3, 2025):

kt0.2.4 neednot install flash_attn,ninja for yourself.....
see this page, KT had update the step:
https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/balance-serve.md

<!-- gh-comment-id:2774382780 --> @CYSTEV-chn commented on GitHub (Apr 3, 2025): kt0.2.4 neednot install flash_attn,ninja for yourself..... see this page, KT had update the step: https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/balance-serve.md
Author
Owner

@594294319 commented on GitHub (Apr 3, 2025):

I encountered the same issue before. After checking, it turned out that the environment variables were loaded multiple times, causing duplicate CUDA paths. The problem was resolved by resetting the environment variables. Hope this helps you!

<!-- gh-comment-id:2774577137 --> @594294319 commented on GitHub (Apr 3, 2025): I encountered the same issue before. After checking, it turned out that the environment variables were loaded multiple times, causing duplicate CUDA paths. The problem was resolved by resetting the environment variables. Hope this helps you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#729
No description provided.