fix: 离线安装 pip3,get-pip.py 使用本地 wheel 不联网
This commit is contained in:
parent
5b4afa25e8
commit
fa5ef7a88a
BIN
deps/pip-26.1.2-py3-none-any.whl
vendored
Normal file
BIN
deps/pip-26.1.2-py3-none-any.whl
vendored
Normal file
Binary file not shown.
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user