Python UV虚拟环境管理器换源

方法 4:全局设置(你的 Ubuntu 实验服务器推荐)

创建:

mkdir -p ~/.config/uv
nano ~/.config/uv/uv.toml

内容:

[[index]]
name = "tuna"
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
default = true

以后所有项目:

uv sync

都会使用清华源。

作者: 高志远

高志远,24岁,男生

发表评论

邮箱地址不会被公开。