[GH-ISSUE #1093] [Bug] 将install.sh修改为 pip -e 后,安装报错 #769

Open
opened 2026-10-29 14:44:14 +00:00 by bsakaguchi · 1 comment
Owner

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

检查清单

  • 1. 我已经搜索过相关问题,但未能获得预期的帮助
  • 2. 该问题在最新版本中尚未修复
  • 3. 请注意,如果您提交的BUG相关 issue 缺少对应环境信息和最小可复现示例,我们将难以复现和定位问题,降低获得反馈的可能性
  • 4. 如果您提出的不是bug而是问题,请在讨论区发起讨论 https://github.com/kvcache-ai/ktransformers/discussions。否则该 issue 将被关闭
  • 5. 为方便社区交流,我将使用中文/英文或附上中文/英文翻译(如使用其他语言)。未附带翻译的非中文/英语内容可能会被关闭

问题描述

为了方便调试,我把install.sh里的
KTRANSFORMERS_FORCE_BUILD=TRUE pip install -v . --no-build-isolation
修改为了
KTRANSFORMERS_FORCE_BUILD=TRUE pip install -v -e . --no-build-isolation
然后就报了如下错误
error: can't copy '/tmp/tmprpdqox2g.build-lib/balance_serve.cpython-311-x86_64-linux-gnu.so': doesn't exist or not a regular file

ps. 如果用原始的install.sh,是可以安装成功的

复现步骤

将install.sh修改为

#!/bin/bash
set -e

# clear build dirs
rm -rf buil
rm -rf *.egg-info
rm -rf csrc/build
rm -rf csrc/ktransformers_ext/build
rm -rf csrc/ktransformers_ext/cuda/build
rm -rf csrc/ktransformers_ext/cuda/dist
rm -rf csrc/ktransformers_ext/cuda/*.egg-info
rm -rf ~/.ktransformers
echo "Installing python dependencies from requirements.txt"
pip install -r requirements-local_chat.txt
pip install -r ktransformers/server/requirements.txt
echo "Installing ktransformers"
KTRANSFORMERS_FORCE_BUILD=TRUE pip install -v -e . --no-build-isolation
pip install -e third_party/custom_flashinfer/

# SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
# echo "Copying thirdparty libs to $SITE_PACKAGES"
# cp -a csrc/balance_serve/build/third_party/prometheus-cpp/lib/libprometheus-cpp-*.so* $SITE_PACKAGES/
# patchelf --set-rpath '$ORIGIN' $SITE_PACKAGES/sched_ext.cpython*


echo "Installation completed successfully"

安装指令为:
USE_BALANCE_SERVE=1 USE_NUMA=1 bash ./install.sh

环境信息

gcc 13.3.0
cuda 12.6
Linux version 6.8.0-55-generic (Ubuntu 13.3.0-6ubuntu2~24.04)

Originally created by @VinayaLee on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1093 ### 检查清单 - [x] 1. 我已经搜索过相关问题,但未能获得预期的帮助 - [x] 2. 该问题在最新版本中尚未修复 - [x] 3. 请注意,如果您提交的BUG相关 issue 缺少对应环境信息和最小可复现示例,我们将难以复现和定位问题,降低获得反馈的可能性 - [x] 4. 如果您提出的不是bug而是问题,请在讨论区发起讨论 https://github.com/kvcache-ai/ktransformers/discussions。否则该 issue 将被关闭 - [x] 5. 为方便社区交流,我将使用中文/英文或附上中文/英文翻译(如使用其他语言)。未附带翻译的非中文/英语内容可能会被关闭 ### 问题描述 为了方便调试,我把install.sh里的 KTRANSFORMERS_FORCE_BUILD=TRUE pip install -v . --no-build-isolation 修改为了 KTRANSFORMERS_FORCE_BUILD=TRUE pip install -v -e . --no-build-isolation 然后就报了如下错误 error: can't copy '/tmp/tmprpdqox2g.build-lib/balance_serve.cpython-311-x86_64-linux-gnu.so': doesn't exist or not a regular file ps. 如果用原始的install.sh,是可以安装成功的 ### 复现步骤 将install.sh修改为 ```shell #!/bin/bash set -e # clear build dirs rm -rf buil rm -rf *.egg-info rm -rf csrc/build rm -rf csrc/ktransformers_ext/build rm -rf csrc/ktransformers_ext/cuda/build rm -rf csrc/ktransformers_ext/cuda/dist rm -rf csrc/ktransformers_ext/cuda/*.egg-info rm -rf ~/.ktransformers echo "Installing python dependencies from requirements.txt" pip install -r requirements-local_chat.txt pip install -r ktransformers/server/requirements.txt echo "Installing ktransformers" KTRANSFORMERS_FORCE_BUILD=TRUE pip install -v -e . --no-build-isolation pip install -e third_party/custom_flashinfer/ # SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])") # echo "Copying thirdparty libs to $SITE_PACKAGES" # cp -a csrc/balance_serve/build/third_party/prometheus-cpp/lib/libprometheus-cpp-*.so* $SITE_PACKAGES/ # patchelf --set-rpath '$ORIGIN' $SITE_PACKAGES/sched_ext.cpython* echo "Installation completed successfully" ``` 安装指令为: USE_BALANCE_SERVE=1 USE_NUMA=1 bash ./install.sh ### 环境信息 gcc 13.3.0 cuda 12.6 Linux version 6.8.0-55-generic (Ubuntu 13.3.0-6ubuntu2~24.04)
Author
Owner

@KMSorSMS commented on GitHub (Apr 11, 2025):

因为一些符号链接的问题,目前-e安装还存在问题,后续会逐步解决

<!-- gh-comment-id:2795687860 --> @KMSorSMS commented on GitHub (Apr 11, 2025): 因为一些符号链接的问题,目前-e安装还存在问题,后续会逐步解决
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#769
No description provided.