Skip to content

Installing LLM Guard


Supported Python versions:

  • 3.9
  • 3.10
  • 3.11

Using pip


Consider installing the LLM Guard python packages on a virtual environment like venv or conda.

pip install llm-guard

If you have issue installing the package due to missing torch, you can try the following commands:

pip install wheel
pip install torch==2.0.1
pip install llm-guard --no-build-isolation

Install from source

To install LLM Guard from source, first clone the repo:

  • Using HTTPS
    git clone
  • Using SSH
    git clone

We recommend to use a virtual environment like venv or conda to install the package.

python -m venv venv
source venv/bin/activate

Then, install the package using pip:

python -m pip install ".[dev]"