uv #
教程 #
# 安装
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.
叶王 © 2013-2024 版权所有。如果本文档对你有所帮助,可以请作者喝饮料。