Description
Running python -m dapper --help fails because the package is missing a __main__.py entry point:
(.venv) $ python -m dapper --help
/Users/roryglenn/Repos/medical_claims/.venv/bin/python: No module named dapper.__main__; 'dapper' is a package and cannot be directly executed
Steps to Reproduce
- Create a virtual environment and activate it
pip install dapper
python -m dapper --help
Environment
| Detail |
Value |
| dapper version |
1.7.3 |
| Python version |
3.14.3 |
| pip version |
26.0 |
| OS |
macOS 26.3.1 (Build 25D2128) |
| Architecture |
arm64 (Apple Silicon) |
| Install method |
pip install dapper inside a venv |
| venv location |
.venv/lib/python3.14/site-packages |
Installed dependencies (from pip show dapper)
colorama, dill, ipdb, ipython, matplotlib, mpl-tools, notebook, numpy, pathos, patlib, pyyaml, scipy, setuptools, struct-tools, tabulate, threadpoolctl, tqdm
Expected Behaviour
python -m dapper --help should display a help/usage message, or at minimum a friendly error explaining the correct CLI entry point.
Root Cause
The dapper package directory does not contain a __main__.py file, so Python's -m flag cannot execute it as a runnable package (see PEP 338).
Suggested Fix
Add a dapper/__main__.py that delegates to the appropriate CLI entry point, e.g.:
"""Allow `python -m dapper` to work."""
from dapper.cli import main # adjust import to actual entry point
if __name__ == "__main__":
main()
Description
Running
python -m dapper --helpfails because the package is missing a__main__.pyentry point:Steps to Reproduce
pip install dapperpython -m dapper --helpEnvironment
pip install dapperinside a venv.venv/lib/python3.14/site-packagesInstalled dependencies (from
pip show dapper)colorama, dill, ipdb, ipython, matplotlib, mpl-tools, notebook, numpy, pathos, patlib, pyyaml, scipy, setuptools, struct-tools, tabulate, threadpoolctl, tqdm
Expected Behaviour
python -m dapper --helpshould display a help/usage message, or at minimum a friendly error explaining the correct CLI entry point.Root Cause
The
dapperpackage directory does not contain a__main__.pyfile, so Python's-mflag cannot execute it as a runnable package (see PEP 338).Suggested Fix
Add a
dapper/__main__.pythat delegates to the appropriate CLI entry point, e.g.: