#!/bin/bash if ! python3 -m pip -V >/dev/null; then echo "Error: pip or pip3 命令, 未找到, 请安装后重试!" exit 1 fi # 升级 pip 到最新的版本 (>=10.0.0) 后进行配置: python3 -m pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple pip -U # 配置源 python3 -m pip config set --user global.index-url 'https://mirrors.aliyun.com/pypi/simple/' python3 -m pip config set --user install.trusted-host 'mirrors.aliyun.com'