Error Knowledge Base PIP NO_REQUIREMENT_GIVEN

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

You ran `pip install` without specifying a package name, a file/path, or `-r requirements.txt`.

Affected versions: All pip versions.

What This Error Means

You ran pip install without specifying a package name, a file/path, or -r requirements.txt.

How to Fix It

  1. Provide a package name: python -m pip install <package>.
  2. If you meant a requirements file: python -m pip install -r requirements.txt.
  3. 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

  1. Re-run the corrected command and confirm pip starts downloading/installing packages.
  2. If using a script, add a guard that fails if the target variable is empty.

Manual argument checks

  1. Print the exact command your shell is running (especially in scripts/CI).
  2. If you're using variables, echo them to ensure they're not empty before calling pip.

Common CLI Output

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

How pip parses install targets

  1. 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).
  2. 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