🚀 uv 国内加速版 (同步自 uv官方版本 0.9.23)
这是一个与 uv 官方版本同步的镜像版本,为国内用户提供了以下优化:
- 下载加速:所有 GitHub 下载链接均通过镜像代理,大幅提升下载速度。
- 预设镜像:自动为您配置清华大学 PyPI 镜像和 Python 构建镜像。
- 灵活配置:支持通过环境变量临时覆盖默认的下载代理和 PyPI 镜像。
快速安装
请根据您的操作系统,在终端中运行以下对应的一键安装命令。推荐使用 Gitee 源。
Gitee (推荐)
# macOS / Linux
curl -LsSf https://gitee.com/wangnov/uv-custom/releases/download/0.9.23/uv-installer-custom.sh | sh# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -c "irm https://gitee.com/wangnov/uv-custom/releases/download/0.9.23/uv-installer-custom.ps1 | iex"GitHub (备用)
# macOS / Linux
curl -LsSf https://github.com/Wangnov/uv-custom/releases/download/0.9.23/uv-installer-custom.sh | sh# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -c "irm https://github.com/Wangnov/uv-custom/releases/download/0.9.23/uv-installer-custom.ps1 | iex"高级用法:自定义镜像源
您可以在运行一键安装命令前,通过设置环境变量来临时指定下载代理和 PyPI 镜像。并可以选择下载不同的uv版本。
- : 用于 和 Python 的下载代理 (例如: )
- : PyPI 镜像源 (例如: )
- : 选择下载不同的uv版本 (例如: )
macOS / Linux 示例
UV_DOWNLOAD_PROXY="https://gh-proxy.com" UV_PYPI_MIRROR="https://mirrors.aliyun.com/pypi/simple/" UV_VERSION="0.7.19" curl -LsSf https://gitee.com/wangnov/uv-custom/releases/download/0.9.23/uv-installer-custom.sh | shWindows (PowerShell) 示例
:UV_DOWNLOAD_PROXY="https://gh-proxy.com"; :UV_PYPI_MIRROR="https://mirrors.aliyun.com/pypi/simple/"; :UV_VERSION="0.7.19"; powershell -ExecutionPolicy Bypass -c "irm https://gitee.com/wangnov/uv-custom/releases/download/0.9.23/uv-installer-custom.ps1 | iex"(可选) 配置 Conda/Mamba 环境联动
如果您希望 uv 能够自动识别并管理当前激活的 Conda/Mamba 环境,可以运行以下对应的脚本来配置 Shell 钩子。
Gitee (推荐)
# macOS / Linux
curl -LsSf https://gitee.com/wangnov/uv-custom/releases/download/0.9.23/setup_hooks.sh | sh# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -c "irm https://gitee.com/wangnov/uv-custom/releases/download/0.9.23/setup_hooks.ps1 | iex"