python uv 安装

irm https://astral.sh/uv/install.ps1 | iex

运行

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
PS C:\Python> irm https://astral.sh/uv/install.ps1 | iex
Error: PowerShell requires an execution policy in [Unrestricted, RemoteSigned, Bypass] to run uv. For example, to set the execution policy to 'RemoteSigned' please run:

    Set-ExecutionPolicy RemoteSigned -scope CurrentUser


[已退出进程,代码为 1 (0x00000001)]
现在可以使用Ctrl+D关闭此终端,或按 Enter 重新启动。
Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

PS C:\Python> Set-ExecutionPolicy RemoteSigned -scope CurrentUser
PS C:\Python> irm https://astral.sh/uv/install.ps1 | iex
downloading uv 0.11.15 (x86_64-pc-windows-msvc)
installing to C:\Users\admin\.local\bin
  uv.exe
  uvx.exe
  uvw.exe
everything's installed!

To add C:\Users\admin\.local\bin to your PATH, either restart your shell or run:

    set Path=C:\Users\admin\.local\bin;%Path%   (cmd)
    $env:Path = "C:\Users\admin\.local\bin;$env:Path"   (powershell)

更多推荐