Registry / devops / poetry-plugin-export

poetry-plugin-export

JSON →
library1.10.0pypypiunverified

poetry-plugin-export is an official Poetry plugin, currently at version 1.10.0, that extends Poetry's functionality by providing an `export` command. This command allows users to convert locked dependencies from `poetry.lock` files into various standardized formats such as `requirements.txt`, `constraints.txt`, and `pylock.toml`. It aims to eventually replace the functionality of Poetry's built-in `export` command (which is no longer bundled by default in Poetry 2.0+). The plugin is actively maintained, with releases tied to the evolution of Poetry itself.

poetry self add poetry-plugin-export
INSTALL
IMPORT
SIG · POETRY-PLUGIN-EXPO
P
poetry-plugin-export
devopspythonv1.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

The plugin provides an `export` command that integrates directly into the Poetry CLI. You can specify the output format, file, and control which dependency groups are included or excluded. The most common use case is generating a `requirements.txt` for environments that rely on `pip`.

# Assuming a pyproject.toml and poetry.lock exist in the current directory # and poetry-plugin-export is installed. # Export to a standard requirements.txt file poetry export -f requirements.txt --output requirements.txt # Export with development dependencies and without package hashes poetry export -f requirements.txt --output dev_requirements.txt --with dev --without-hashes # Export to a constraints.txt file including all dependency groups poetry export -f constraints.txt --output constraints.txt --all-groups
poetry --version
Debug
Known issues
breakingAs of Poetry 2.0, the `poetry export` command is no longer bundled by default with Poetry. Users must explicitly install `poetry-plugin-export` to regain this functionality.
fix
Install the plugin using `poetry self add poetry-plugin-export` (for older plugin installation methods) or declare it as a required plugin in `pyproject.toml` under `[tool.poetry.requires-plugins]` for Poetry 2.0+.
affects: Poetry >= 2.0.0
breakingPython 3.9 support was dropped in `poetry-plugin-export` version 1.10.0. Python 3.8 support was dropped in 1.9.0, and Python 3.7 support in 1.5.0.
fix
Ensure your project's Python environment meets the plugin's `requires-python` constraint, which is currently `>=3.10,<4.0` for version 1.10.0.
affects: 1.10.0 (drops 3.9), 1.9.0 (drops 3.8), 1.5.0 (drops 3.7)
gotchaWhen installing an exported `requirements.txt` file via `pip`, always pass `--no-deps`. Poetry has already resolved all direct and transitive dependencies, and `pip` trying to re-resolve can lead to failures, especially with git dependencies.
fix
Use `pip install -r requirements.txt --no-deps`.
affects: All versions
deprecatedThe `--without` option for excluding dependency groups was deprecated in version 1.9.0. While still functional, it's recommended to use `--only` or explicitly list `--with` groups for clarity.
fix
Prefer using `--only <group>` to include only specific groups, or explicitly specify groups with `--with <group>`.
affects: >= 1.9.0
gotchaThe plugin requires `poetry.lock` to be consistent with `pyproject.toml`. If the lock file is outdated, the export command might fail.
fix
Run `poetry lock` or `poetry update` to ensure `poetry.lock` is up-to-date and consistent before exporting.
affects: All versions
gotchaEditable installs and git dependencies have had issues with correct export in past versions. While some fixes were implemented (e.g., 1.8.0 for editable, 1.6.0 for git commit hashes), ensure your specific setup works as expected.
fix
Update to the latest plugin version to benefit from fixes. Verify exported files in complex dependency scenarios.
affects: < 1.8.0 (editable), < 1.6.0 (git branches)
breakingAttempting to run `poetry` commands directly in a Python script (e.g., `poetry export -f requirements.txt`) without using `subprocess.run()` or `os.system()` will result in a `SyntaxError`.
fix
Execute `poetry` commands from a Python script using `subprocess.run(['poetry', 'export', '-f', 'requirements.txt', '--output', 'requirements.txt'], check=True)` or `os.system('poetry export -f requirements.txt --output requirements.txt')`.
affects: All versions
gotchaAttempting to execute shell commands (like `poetry export ...`) directly in a Python script will result in a `SyntaxError`. Shell commands must be invoked using Python's `subprocess` module or by executing the script in a shell environment.
fix
To run shell commands from within a Python script, use `subprocess.run(['poetry', 'export', '-f', 'requirements.txt', '--output', 'requirements.txt'], check=True)` or ensure the command is executed directly in your shell/terminal.
affects: All Python versions
Errors
Common errors & fixes
The command "export" does not exist
The `export` command is no longer a built-in feature of Poetry 2.0 and later versions; it has been moved to the `poetry-plugin-export` and must be explicitly installed.
fix
Install the plugin using `poetry self add poetry-plugin-export`.
Warning: poetry-plugin-export will not be installed by default in a future version of Poetry. In order to avoid a breaking change and make your automation forward-compatible, please install poetry-plugin-export explicitly.
This is a 'future warning' from Poetry (typically versions 1.2.0 to <2.0.0) indicating that the `export` command, previously bundled, will no longer be part of the default Poetry installation in upcoming major versions. It may appear even if the plugin is already installed, as Poetry cannot distinguish between automatically and manually installed plugins for this warning.
fix
Ensure the plugin is installed with `poetry self add poetry-plugin-export`. To silence the warning after installation, run `poetry config warnings.export false`.
Because no versions of poetry-plugin-export match >1.9.0,<2.0.0 and poetry-plugin-export (1.9.0) depends on poetry (>=2.0.0,<3.0.0), poetry-plugin-export (>=1.9.0,<2.0.0) requires poetry (>=2.0.0,<3.0.0). So, because poetry-instance depends on both poetry (1.8.2) and poetry-plugin-export (^1.9.0), version solving failed.
The installed version of Poetry is incompatible with the version of `poetry-plugin-export` being attempted for installation; the plugin requires a newer Poetry version than what is currently present.
fix
Update Poetry to a compatible version (e.g., `poetry self update`) before installing the plugin, or specify a plugin version that is compatible with your current Poetry installation.
Ensuring that the Poetry plugins required by the project are available... The following Poetry plugins are required by the project but are not installed in Poetry's environment: - poetry-plugin-export (>=1.8) Installing Poetry plugins only for the current project...
The `poetry-plugin-export` is declared as a required plugin in your project's `pyproject.toml` file under `[tool.poetry.requires-plugins]`, but it has not been installed into Poetry's self-managed environment.
fix
Install the plugin using `poetry self add poetry-plugin-export`.
Upgrade
Version history
1.10.0latest on PyPI · released Jan 18, 2026
Audit
Dependencies
poetryrequiredCore dependency for Poetry plugins; explicitly requires >=2.1.0,<3.0.0 as per plugin's pyproject.toml.
poetry-corerequiredCore dependency for Poetry plugins; explicitly requires >=2.1.0,<3.0.0 as per plugin's pyproject.toml.
pythonrequiredRequires Python versions >=3.10, <4.0.
Agent activity
7 hits · last 30 days
node
6
Resources
poetry-plugin-export — pip install poetry-plugin-export · libregistry