Diagnose Virtual Environment Shebang Import Errors When a CLI tool fails with ModuleNotFoundError despite the package being installed, check if the entry point shebang ( ) resolves to the system Python instead of the venv Python. Verify by: (1) checking which python the shebang resolves to, (2) confirming the package exists in the venv but not system python, (3) updating the shebang to point directly to the venv's Python binary (e.g., ). If the shebang keeps reverting after updates, investigate post-install hooks that may regenerate entry points with generic shebangs. ---