- Official documentation: https://python-poetry.org/docs/
Put the virtual directory inside the project
poetry config virtualenvs.in-project true
Discover the python interpreter for virtual environments such as
pyenv
poetry config virtualenvs.prefer-active-python true
Package domestic mirror (pyproject.toml)
[[tool.poetry.source]] name = "aliyun" url = "https://mirrors.aliyun.com/pypi/simple/" default = true
[[tool.poetry.source]] name = "douban" url = "https://pypi.doubanio.com/simple/" default = true
Specify third-party packages for a specific platform (linux)
[tool.poetry.dependencies] python = "~3.8.8" fastapi = { version = "~0.65.3", extras = ["all"] } gunicorn = { version = "~20.1.0", platform = "linux"}
poetry export requirements.txt
poetry export -f requirements.txt --output requirements.txt poetry export --without-hashes -f requirements.txt --output requirements.txt
This article is from qbit snap
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。