CI "ruff: command not found" - Linter Not Installed
The job called ruff but no such executable is on PATH. Either the linter was never installed in this environment, or it was installed somewhere PATH does not include.
What this error means
A lint step fails instantly with ruff: command not found (or black/mypy). The tool may be in a venv or ~/.local/bin that the step never put on PATH, or it was simply not installed.
Run ruff check .
/home/runner/work/_temp/script.sh: line 1: ruff: command not found
Error: Process completed with exit code 127.Common causes
The linter is not installed in this environment
A dependency group that includes ruff was not installed, so the executable does not exist for this job.
Installed but not on PATH
ruff was installed into a venv or ~/.local/bin that the current step does not have on PATH, so the bare command is unresolved.
How to fix it
Install the linter (or invoke as a module)
Install ruff and run it; calling it via python -m sidesteps PATH issues.
pip install ruff
ruff check .
# PATH-independent:
python -m ruff check .Put the script directory on PATH
If installed into a venv/user location, add that bin to the job PATH.
- run: |
pip install --user ruff
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: ruff check .How to prevent it
- Pin and install linters in the CI dependency set (e.g. a
[lint]extra). - Prefer
python -m ruffto avoid PATH problems. - Use pre-commit or the official ruff action so the tool is provisioned consistently.