--require-hashes

A pip option that refuses to install anything not pinned to one version and matching a hash recorded in the requirements file.

In more detail

It makes a lockfile enforceable: an unhashed or unpinned line is a hard error. Transitive dependencies you never named are checked too.

Example

pip install --require-hashes -r requirements.lock

Related terms

Taught in

References