fix: 离线安装 pip3,get-pip.py 使用本地 wheel 不联网

This commit is contained in:
tian 2026-07-24 08:50:15 +08:00
parent 5b4afa25e8
commit fa5ef7a88a
2 changed files with 2 additions and 2 deletions

BIN
deps/pip-26.1.2-py3-none-any.whl vendored Normal file

Binary file not shown.

View File

@ -57,10 +57,10 @@ fi
# 安装 Python 依赖全局root 可访问)
if [ -d "$INSTALL_DIR/deps" ] && ls "$INSTALL_DIR/deps"/*.whl >/dev/null 2>&1; then
# 先确保 pip3 可用(离线环境下可能未安装)
# 先确保 pip3 可用(离线安装)
if ! command -v pip3 &>/dev/null; then
if [ -f "$INSTALL_DIR/deps/get-pip.py" ]; then
python3 "$INSTALL_DIR/deps/get-pip.py" --no-setuptools --no-wheel 2>&1
python3 "$INSTALL_DIR/deps/get-pip.py" --no-index --find-links="$INSTALL_DIR/deps/" 2>&1
fi
fi
if pip3 install --force-reinstall "$INSTALL_DIR"/deps/*.whl 2>&1; then