作者:matrix 被围观: 1,340 次 发布时间:2021-11-30 分类:Python | 一条评论 »
用的pipenv但是lock时间有点太长了,所以到poetry试试水...
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
poetry init
按照选项默认就好
poetry add requests=3.6
poetry add requests@last
安装之后系统会自动生成pyproject.toml
,poetry.lock
文件
poetry remove requests
poetry show
poetry show --tree
pyproject.toml 末尾:
[[tool.poetry.source]]
name = "tsinghua"
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
用熟悉了基本命令也就清楚,不用翻文档。但是vscode上兼容性不好,还要自己配置解析器😭
参考:
https://[Python](https://www.hhtjim.com/category/python)-poetry.org/docs/basic-usage/
https://greyli.com/poetry-a-better-choice-than-[pipenv](https://www.hhtjim.com/tag/pipenv)/