UV
curl -LsSf https://astral.sh/uv/install.sh | sh
# 或使用 wget
wget -qO- https://astral.sh/uv/install.sh | sh
# 指定版本(例如 0.8.17)
curl -LsSf https://astral.sh/uv/0.8.17/install.sh | shpowershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# 指定版本
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.8.17/install.ps1 | iex"Shell 自动补全
echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrcecho 'eval "$(uv generate-shell-completion zsh)"' >> ~/.zshrcuv generate-shell-completion fish | source > ~/.config/fish/completions/uv.fishecho 'eval (uv generate-shell-completion elvish | slurp)' >> ~/.elvish/rc.elvif (!(Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value '(& uv generate-shell-completion powershell) | Out-String | Invoke-Expression'echo 'eval "$(uvx --generate-shell-completion bash)"' >> ~/.bashrcecho 'eval "$(uvx --generate-shell-completion zsh)"' >> ~/.zshrcecho 'uvx --generate-shell-completion fish | source' > ~/.config/fish/completions/uvx.fishecho 'eval (uvx --generate-shell-completion elvish | slurp)' >> ~/.elvish/rc.elvif (!(Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value '(& uvx --generate-shell-completion powershell) | Out-String | Invoke-Expression'卸载
uv cache clean
rm -r "$(uv python dir)"
rm -r "$(uv tool dir)"最后更新于