Python uv 配置镜像源
Python 镜像 About 517 words配置文件设置
在pyproject.toml中配置。
清华镜像源
[[tool.uv.index]]
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
default = true
交大镜像源
[[tool.uv.index]]
url = "https://mirror.sjtu.edu.cn/pypi/web/simple"
default = true
全局环境变量设置
设置UV_DEFAULT_INDEX环境变量
macOS & Linux
export UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
Windows
$env:UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple"
临时使用
uv add requests --index https://pypi.tuna.tsinghua.edu.cn/simple
参考文档
Views: 10 · Posted: 2026-06-11
———         Thanks for Reading         ———
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...