poetry-exec-plugin
raw JSON → 1.0.1 verified Fri May 01 auth: no python
A Poetry plugin that allows executing scripts defined in pyproject.toml under the [tool.poetry.scripts] table, similar to npm run or pipenv run. Current version: 1.0.1, supports Poetry 2.x. Release cadence is sporadic.
pip install poetry-exec-plugin Common errors
error ModuleNotFoundError: No module named 'poetry_exec' ↓
cause Missing import, but this plugin is not imported directly; it's activated via Poetry plugin mechanism. The error may appear when trying to import the plugin mistakenly.
fix
Do not import the plugin. Install it and run
poetry exec as a CLI command. error AttributeError: module 'poetry' has no attribute 'exec' ↓
cause The plugin is not installed or not activated in Poetry's environment. Poetry 2.x requires explicit plugin installation; `poetry self add` or install in the same environment.
fix
Run
poetry self add poetry-exec-plugin (Poetry 2.x) or pip install poetry-exec-plugin in the same environment as poetry. error Plugin poetry-exec-plugin is not installed ↓
cause The plugin is missing from Poetry's environment. It needs to be installed where Poetry is installed.
fix
Use
poetry self add poetry-exec-plugin (Poetry 2.x) or reinstall with pip install poetry-exec-plugin in the Poetry environment. Warnings
breaking Version 1.0.0 dropped support for Poetry 1.x. If you are on Poetry 1.x, pin to version 0.3.6. ↓
fix For Poetry 1.x: pip install 'poetry-exec-plugin<1.0.0' (e.g., 0.3.6).
gotcha Scripts must be defined under [tool.poetry.scripts] (not [tool.poetry.scripts.exec] or [tool.poetry.exec]). ↓
fix Use the correct TOML key: [tool.poetry.scripts].
deprecated The previous script syntax using [tool.poetry.scripts.<name>] = "module:function" still works but the official docs now recommend the dict form with 'callable', 'help', and 'args'. ↓
fix Update to dict form: greet = { callable = "...", help = "...", args = "..." }.
Quickstart
# After installing the plugin, add scripts to pyproject.toml:
# [tool.poetry.scripts]
# greet = { callable = "my_package.module:greet_func", help = "Prints a greeting", args = "[name]" }
# Then run:
# poetry exec greet Alice