Skip to main content
Error message on macOS:
Error message on Ubuntu:

How to fix this error

The recommended way to install Semgrep is to use a tool that manages isolated environments for standalone Python applications, such as pipx or uv. See the Python Packaging guide on installing stand-alone command-line tools for more on these tools. Choose one of the following:
  • Install pipx, then run pipx install semgrep.
  • Install uv, then run uv tool install semgrep. To run a one-off Semgrep command without persistently installing it, use uvx semgrep. See the uv tools guide for more details.
  • Install Semgrep using homebrew, with brew install semgrep.
If you’re already using a custom Python virtual environment, you can install Semgrep in this existing environment instead.