Error Knowledge Base PIP NO_REQUIREMENT_GIVEN

ERROR: You must give at least one requirement to install (see "pip help install")

pip install failed because no package, requirements file, wheel, or local path was provided, so pip had nothing to install.

What This Error Means

pip install failed because no package, requirements file, wheel, or local path was provided, so pip had nothing to install.

How to Fix It

Provide a package name:python -m pip install <package>

If you meant a requirements file:python -m pip install -r requirements.txt

If you meant a local project:python -m pip install . (from the project root containing pyproject.toml or setup.py).

Why It Happens

You ran pip install with no package names.

A script built the command incorrectly (empty variable or missing arguments).

You meant to use -r requirements.txt but forgot -r.

How to Verify

Re-run the corrected command and confirm pip starts downloading/installing packages.

If using a script, add a guard that fails if the target variable is empty.

Manual argument checks

Print the exact command your shell is running (especially in scripts/CI).

If you're using variables, echo them to ensure they're not empty before calling pip.

Examples

ERROR: You must give at least one requirement to install (see "pip help install")

How pip parses install targets

pip install requires at least one "requirement specifier" (a package name like requests, a wheel file, a VCS URL, or a requirements file with -r).

If all arguments are flags (or the target is empty due to shell expansion/scripting), pip stops with this error.

Prevention Tips

In scripts, use set -u (bash) or equivalent to catch empty variables.

Prefer explicit requirements files (-r requirements.txt) for reproducible installs.

Keep install commands in one place (Makefile/script) to reduce typos.

Where This Can Be Triggered

github.com/pypa/pip/blob/25.3/src/pip/_internal/cli/req_command.py

pip raises a CommandError with "You must give at least one requirement ..." when pip install has no package args, editables, -r files, or dependency groups. - GitHub

if not (
    args
    or options.editables
    or options.requirements
    or options.dependency_groups
):
    opts = {"name": self.name}
    if options.find_links:
        raise CommandError(
            "You must give at least one requirement to {name} "
            '(maybe you meant "pip {name} {links}"?)'.format(
                **dict(opts, links=" ".join(options.find_links))
            )
        )
    else:
        raise CommandError(
            "You must give at least one requirement to {name} "
            '(see "pip help {name}")'.format(**opts)
        )

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list