Diagnose Virtual Environment Shebang Mismatch When a CLI tool throws ModuleNotFoundError for an installed package, check if the entry point shebang ( ) resolves to a different Python than the venv where the package is installed. Verify the installed script location ( ) against the actual venv path. Update the shebang to explicitly point to the venv's Python binary ( ). Note: reinstalls/updates may revert shebangs to generic defaults — check post-install hooks if this recurs. ---