{"id":"c45562201e13bd3f","repo":"pypa/pip","slug":"you-must-give-at-least-one-requirement-to-name-c45562","errorCode":null,"errorMessage":"You must give at least one requirement to {name} (see \"pip help {name}\")","messagePattern":"You must give at least one requirement to (.+?) \\(see \"pip help (.+?)\"\\)","errorType":"exception","errorClass":"CommandError","httpStatus":null,"severity":"error","filePath":"src/pip/_internal/cli/req_command.py","lineNumber":459,"sourceCode":"            options.require_hashes = True\n\n        if not (\n            args\n            or options.editables\n            or options.requirements\n            or options.dependency_groups\n            or options.requirements_from_scripts\n        ):\n            opts = {\"name\": self.name}\n            if options.find_links:\n                raise CommandError(\n                    \"You must give at least one requirement to {name} \"\n                    '(maybe you meant \"pip {name} {links}\"?)'.format(\n                        **dict(opts, links=\" \".join(options.find_links))\n                    )\n                )\n            else:\n                raise CommandError(\n                    \"You must give at least one requirement to {name} \"\n                    '(see \"pip help {name}\")'.format(**opts)\n                )\n\n        return requirements\n\n    @staticmethod\n    def trace_basic_info(finder: PackageFinder) -> None:\n        \"\"\"\n        Trace basic information about the provided objects.\n        \"\"\"\n        # Display where finder is looking for packages\n        search_scope = finder.search_scope\n        locations = search_scope.get_formatted_locations()\n        if locations:\n            logger.info(locations)\n\n    def _build_package_finder(","sourceCodeStart":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/pypa/pip/blob/d7d0d0a39494e28ec1c407bd0680e4a4d1067791/src/pip/_internal/cli/req_command.py#L441-L477","documentation":"Raised by RequirementCommand when an install/download/wheel call has no requirement of any kind and also no --find-links, so there is nothing helpful to suggest beyond the general help. It is the catch-all counterpart to error 21: pip cannot proceed because the command would install nothing.","triggerScenarios":"Bare 'pip install', 'pip download', or 'pip wheel' with no positional package, no -r file, no -e, no --find-links. The else branch at req_command.py:458 is reached.","commonSituations":"A CI matrix variable that resolved to empty; a script that builds a requirements list at runtime but produced zero entries; a typo'd -r (e.g. '-R'); running the command expecting an interactive prompt.","solutions":["Supply at least one requirement: a package name, -r requirements.txt, -e <path>, or an archive URL.","If the requirement should come from a variable, assert the variable is non-empty before invoking pip.","Run 'pip help install' (or download/wheel) to review accepted input forms."],"exampleFix":"// before\npip install\n// after\npip install requests","handlingStrategy":"validation","validationCode":"has_req = bool(packages or requirements_files or editables or dependency_groups)\nif not has_req:\n    raise SystemExit(\"pip install needs at least one requirement\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build the requirements list in the script and assert it is non-empty before calling pip.","Use 'pip help <command>' to confirm accepted input forms."],"tags":["pip","cli","missing-argument"],"analyzedSha":"d7d0d0a39494e28ec1c407bd0680e4a4d1067791","analyzedAt":"2026-08-04T20:55:04.259Z","schemaVersion":2}