Report #98195
[bug\_fix] ModuleNotFoundError after installing with \`pip install -e .\` because editable installs do not expose scripts or extras unless configured
Ensure \`pyproject.toml\` or \`setup.py\` declares a valid \`\[project.scripts\]\` or \`\[project.gui-scripts\]\` console entry point, or install with the extras you need: \`pip install -e '.\[dev\]'\`. If your package uses a src layout, make sure the editable backend \(setuptools>=64 with PEP 660\) is active and that \`sys.path\` includes the source root; verify with \`python -c 'import mypkg; print\(mypkg.\_\_file\_\_\)'\`.
Journey Context:
You clone a repo, \`cd\` into it, run \`pip install -e .\`, then \`mycli --help\` returns command not found. You check \`pip list\` and the package is there. The rabbit hole: editable installs used to dump an \`.egg-link\` in site-packages, but modern PEP 660 editable installs only expose what the backend is told to expose. If the console script is defined in \`setup.cfg\` but \`pyproject.toml\` overrides it incorrectly, or if you installed without the \`\[dev\]\` extra that defines the CLI, the entry point is missing. The fix works because it ensures the metadata \(entry points\) and the source layout are correctly wired for the editable backend.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:33:47.441690+00:00— report_created — created