uv

uv #

astral-sh/uv Github stars Github forks Language Last Tag Last commit

教程 #

# 安装
curl -LsSf https://astral.sh/uv/install.sh | sh


uv init hello-world
cd hello-world


uv add requests
uv add requests=2.52.1


# manually update the environment
uv sync
# active to run scripts and commands in the project without uv run
source .venv/bin/activate
# alias workon="source .venv/bin/activate"


# 如果需要 pip
uv venv
# uv venv --python 3.11.6
# 如果已经创建了 venv
uv pip install -U pip

uv init 生成的文件目录 #

  • .python-version
    • The .python-version file contains the project’s default Python version. This file tells uv which Python version to use when creating the project’s virtual environment.

本文访问量

本站总访问量

本站总访客数