{"id":"62602be763cf7bb5","repo":"pypa/pip","slug":"entry-point-r-not-found","errorCode":null,"errorMessage":"Entry point %r not found","messagePattern":"Entry point %r not found","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"src/pip/_vendor/pkg_resources/__init__.py","lineNumber":3180,"sourceCode":"    ):\n        return cls.from_location(\n            _normalize_cached(filename), os.path.basename(filename), metadata, **kw\n        )\n\n    def as_requirement(self):\n        \"\"\"Return a ``Requirement`` that matches this distribution exactly\"\"\"\n        if isinstance(self.parsed_version, _packaging_version.Version):\n            spec = \"%s==%s\" % (self.project_name, self.parsed_version)\n        else:\n            spec = \"%s===%s\" % (self.project_name, self.parsed_version)\n\n        return Requirement.parse(spec)\n\n    def load_entry_point(self, group: str, name: str) -> _ResolvedEntryPoint:\n        \"\"\"Return the `name` entry point of `group` or raise ImportError\"\"\"\n        ep = self.get_entry_info(group, name)\n        if ep is None:\n            raise ImportError(\"Entry point %r not found\" % ((group, name),))\n        return ep.load()\n\n    @overload\n    def get_entry_map(self, group: None = None) -> dict[str, dict[str, EntryPoint]]: ...\n    @overload\n    def get_entry_map(self, group: str) -> dict[str, EntryPoint]: ...\n    def get_entry_map(self, group: str | None = None):\n        \"\"\"Return the entry point map for `group`, or the full entry map\"\"\"\n        if not hasattr(self, \"_ep_map\"):\n            self._ep_map = EntryPoint.parse_map(\n                self._get_metadata('entry_points.txt'), self\n            )\n        if group is not None:\n            return self._ep_map.get(group, {})\n        return self._ep_map\n\n    def get_entry_info(self, group: str, name: str):\n        \"\"\"Return the EntryPoint object for `group`+`name`, or ``None``\"\"\"","sourceCodeStart":3162,"sourceCodeEnd":3198,"githubUrl":"https://github.com/pypa/pip/blob/d7d0d0a39494e28ec1c407bd0680e4a4d1067791/src/pip/_vendor/pkg_resources/__init__.py#L3162-L3198","documentation":"Raised as ImportError from Distribution.load_entry_point() when get_entry_info(group, name) returns None — meaning no entry point with that (group, name) pair exists in the distribution's entry_points.txt. It is the canonical 'entry point missing' signal used by code that tries to invoke a console script or plugin hook.","triggerScenarios":"Calling dist.load_entry_point(group, name) for a group/name combination that the distribution does not declare; get_entry_map(group).get(name) is None.","commonSituations":"Wrong group or name string, the entry point was renamed/removed in a newer version, or the package providing the entry point is not the one resolved by pkg_resources.","solutions":["Use get_entry_map(group) / get_entry_info(group, name) first and handle None instead of blindly calling load_entry_point.","Verify the group and name against the installed package's entry_points.txt or 'pip show -f <pkg>'.","Install or pin the version of the package that actually provides that entry point."],"exampleFix":"# before\nfn = dist.load_entry_point('console_scripts', 'mytool')  # ImportError\n\n# after\nep = dist.get_entry_info('console_scripts', 'mytool')\nif ep is None:\n    raise SystemExit('mytool entry point not installed')\nfn = ep.load()","handlingStrategy":"validation","validationCode":"ep = dist.get_entry_info(group, name)\nif ep is None:\n    raise SystemExit(f'entry point {group}:{name} not installed')\nfn = ep.load()","typeGuard":"def entry_point_exists(dist, group: str, name: str) -> bool:\n    return dist.get_entry_info(group, name) is not None","tryCatchPattern":"try:\n    fn = dist.load_entry_point(group, name)\nexcept ImportError:\n    fn = None  # graceful absence","preventionTips":["Prefer get_entry_info/load over load_entry_point to handle absence explicitly.","Verify entry points with 'pip show -f' before relying on them."],"tags":["python","pkg-resources","entry-points","import"],"analyzedSha":"d7d0d0a39494e28ec1c407bd0680e4a4d1067791","analyzedAt":"2026-08-04T20:55:04.259Z","schemaVersion":2}