ZhangZhihui's Blog  

 

PS C:\Users\ZhangZhihui> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
downloading uv 0.11.15 (x86_64-pc-windows-msvc)
installing to C:\Users\ZhangZhihui\.local\bin
  uv.exe
  uvx.exe
  uvw.exe
everything's installed!

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

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

 

uv init my-project       # 初始化一个新项目
cd my-project
uv add requests          # 自动创建虚拟环境并添加依赖
uv run main.py           # 自动在正确的虚拟环境中运行代码

 

posted on 2026-05-19 11:00  ZhangZhihuiAAA  阅读(59)  评论(0)    收藏  举报