uv + poetry
下载 https://github.com/astral-sh/uv/releases
which uv
https://python-poetry.org/docs/ 官方的要求是建在虚拟环境中,以防止异常升级造成环境破坏。
# 修改 .env
cp .env.example .env
# 初始化环境和安装 poetry
build.sh
# 载入环境
. .env
# 验证
which poetry
# 添加依赖:
poetry lock
poetry install --no-root
# 运行
poetry run python main.py
my_project/
├── poetry.toml
├── pyproject.toml
└── main.py