Skip to content
Latchkey

schemathesis "command not found" (not pip installed) in CI

The shell could not find the schemathesis (st) executable because the Python package is not installed on the runner. It is a pip package, not preinstalled.

What this error means

A step calling schemathesis run ... fails with "schemathesis: command not found" and the job exits with code 127.

schemathesis
/home/runner/work/_temp/script.sh: line 1: schemathesis: command not found
Error: Process completed with exit code 127.

Common causes

schemathesis is not installed

The runner has Python but not schemathesis; without an explicit pip install schemathesis the CLI is absent.

Installed into a different environment

schemathesis was installed into a venv that the run step did not activate, so it is not on PATH for that step.

How to fix it

Install schemathesis with pip, then run

  1. Add a step that installs schemathesis with pip.
  2. Run it in the same job so it is on PATH.
  3. Pin the version for reproducibility.
.github/workflows/ci.yml
- run: pip install schemathesis
- run: schemathesis run http://localhost:8000/openapi.json

Invoke through the interpreter if PATH is unclear

Calling the module avoids PATH issues when a venv is not activated.

Terminal
python -m schemathesis run http://localhost:8000/openapi.json

How to prevent it

  • Install schemathesis explicitly before the run step.
  • Activate the venv (or use python -m) that holds it.
  • Pin the schemathesis version alongside your other test tools.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →