2.1 配置镜像源
2.1 配置镜像源
pip 镜像(清华源)
python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
如果升级 pip 时网络就不稳定:
python -m pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade pip
HuggingFace 镜像
训练 SmolVLA 等模型时需要从 HuggingFace 下载权重:
# Linux / macOS
export HF_ENDPOINT=https://hf-mirror.com
# Windows PowerShell
$env:HF_ENDPOINT="https://hf-mirror.com"
Ubuntu 软件源
建议切换为阿里云镜像,参考 Ubuntu 更换阿里云软件源。
配置 pip 清华镜像
linux: python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
macos: python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
windows: python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple