Poetry Python project dependency management and packaging with lockfiles and environments.
Overview Poetry manages dependencies and packaging for Python projects. Its workflow declares project requirements in pyproject.toml and records resolved package versions in poetry.lock. It can manage a virtual environment for the project and supports a non-package mode for users who need dependency management without building or publishing a distribution.[2]
Contents Requirements and resolved versions Version constraints describe the acceptable dependencies; the lockfile records the selected versions. When no lockfile exists, installation resolves the project and writes one. Retaining the lockfile in version control lets collaborators use the recorded dependency set rather than independently selecting versions from the available ranges.[2]
Interpreter and environment selection Poetry can use an already active virtual environment or manage one for the project. The chosen interpreter must satisfy the project's Python requirement, and users can explicitly select an interpreter. Environment activation and command execution are separate conveniences; the former poetry shell command now belongs to a plugin rather than the core environment interface.[3]
Package repositories Poetry uses PyPI implicitly when no primary package source is configured. Adding a primary source disables that implicit source unless PyPI is added explicitly. Installation sources are project-level settings and differ from repository configuration used for publishing. A migration involving private packages should consequently inspect both discovery and publication configuration.[4]
Package metadata limits Poetry-specific package sources are not included in the core metadata produced by poetry-core. Installing the resulting project through another installer therefore does not automatically preserve those source rules. A package can be structurally installable while still requiring independent repository configuration to resolve its dependencies as intended.[4]
Modes and licensing Poetry is MIT-licensed. Package mode supports the project as a distributable package; non-package mode installs dependencies without installing the project itself and does not build or publish a distribution. These modes distinguish managing an application environment from preparing a package for other users.[1] [2]
Substitution considerations Poetry can replace Pipenv for project dependency management when a pyproject-centered workflow or package-building support is useful. Pipfile-based requirements and environment conventions need translating. The overlap is managing dependencies for development; preserving lock semantics, repository choices and deployment configuration requires explicit review.[2] [4] [5]
References Poetry license MIT permission conditions
vendor · retrieved 2026-10-07 Poetry basic usage Package/non-package modes; pyproject and lockfile; virtual environments
vendor · retrieved 2026-10-07 Poetry environments Interpreter choice; existing virtualenvs; shell moved to plugin
vendor · retrieved 2026-10-07 Poetry repositories Primary source disables implicit PyPI; source settings absent from package metadata
vendor · retrieved 2026-10-07 Pipenv introduction Unified pip/virtualenv workflow; platform support
vendor · retrieved 2026-10-07 Also included: 2 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.