pip "Cargo, the Rust package manager, is not installed"
A package with a Rust extension (cryptography, pydantic-core, orjson) had no prebuilt wheel for your platform, so pip tried to compile it from source - which needs a Rust toolchain the runner does not have.
What this error means
During install pip reports that the package requires Rust and that Cargo is not installed, with a link to rustup. The pure-Python part is fine; the native Rust build cannot proceed without a compiler.
error: can't find Rust compiler
If you are using an outdated pip version, ... a binary wheel is available ...
This package requires Rust >=1.63 and Cargo to build. ...
ERROR: Failed building wheel for cryptographyCommon causes
No wheel for this platform/Python
On musl/Alpine, an exotic arch, or a brand-new Python, there may be no prebuilt wheel, so pip falls back to compiling the Rust extension.
Outdated pip not seeing the wheel
An old pip can fail to select an available manylinux wheel and unnecessarily attempt a source build.
How to fix it
Upgrade pip and prefer the wheel
A current pip usually finds a prebuilt wheel and skips Rust entirely.
python -m pip install --upgrade pip
pip install --only-binary :all: cryptographyInstall Rust if you must build from source
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
pip install cryptographyHow to prevent it
- Use glibc base images where manylinux wheels are available.
- Keep pip current so it selects prebuilt wheels.
- Bake the Rust toolchain into images that genuinely need source builds.