uv 安装脚本加速
uv是一个非常优秀的Python版本、环境和包管理工具。这个工具可以通过使用一些github加速器来帮助通过远程脚本安装 uv。
使用方法
通过脚本安装uv(注意除了首次安装uv之外,通过uv self update
遇到Connection timed out
的情況,也可以通过下面的方式直接更新uv到新版本)。
=== "macOS and Linux"
使用 curl
下载脚本并用 sh
执行:
curl -LsSf https://uv.ifcfg.cn/install.sh | sh
如果您的系统没有 curl
,可以使用 wget
:
wget -qO- https://uv.ifcfg.cn/install.sh | sh
通过在 URL 中包含版本号来请求特定版本:
curl -LsSf https://uv.ifcfg.cn/0.7.21/install.sh | sh
=== "Windows"
使用 irm
下载脚本并用 iex
执行:
powershell -ExecutionPolicy ByPass -c "irm https://uv.ifcfg.cn/install.ps1 | iex"
更改执行策略允许从互联网运行脚本。
通过在 URL 中包含版本号来请求特定版本:
powershell -ExecutionPolicy ByPass -c "irm https://uv.ifcfg.cn/0.7.21/install.ps1 | iex"
选择使用哪个github加速器
可以通过在 URL 中包含 ?service
来选择使用哪个github加速器,比如
curl -LsSf https://uv.ifcfg.cn/install.sh?service=ghfast.top | sh
service
参数目前支持以下github加速器:
- ghfast.top: https://ghfast.top/
- gh-proxy.com: https://gh-proxy.com/
- gitproxy.net: https://gitproxy.net/
- moeyy: https://github.moeyy.xyz/
- ghproxy.net: https://ghproxy.net/
目前默认使用 ghfast.top 作为github加速器。