uv是什么?
uv 是为 Python 社区设计的现代化工具,目标是成为
pip+virtualenv+pip-tools的一体化替代品。它不仅安装包,还能创建虚拟环境、锁定依赖版本、管理 Python 解释器本身 。
uv官方脚本 (推荐):
在 PowerShell 中执行:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
注:uv还可以使用pip安装
设置过年镜像源:
在 PowerShell 中执行:
$env:UV_DEFAULT_INDEX = "https://pypi.tuna.tsinghua.edu.cn/simple"