uv 环境变量

63 阅读1分钟

windows 激活 env 环境


.venv\Scripts\activate.bat

Installation

Install uv with our standalone installers:

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Or, from PyPI:

# With pip.
pip install uv
# Or pipx.
pipx install uv

If installed via the standalone installer, uv can update itself to the latest version:

uv self update

安装结果记录



(base) C:\Windows\System32>powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"                                                                                                                                Downloading uv 0.8.22 (x86_64-pc-windows-msvc)                                                                                                                                                                                               Installing to C:\Users\jmdxj\.local\bin
  uv.exe
  uvx.exe
  uvw.exe
everything's installed!

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

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