Skip to content

Installing Presidio


This document describes how to download and install the Presidio services locally. As Presidio is comprised of several packages/services, this document describes the installation of the entire Presidio suite using pip (as Python packages) or using Docker (As containerized services).

Using pip


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

Supported Python Versions

Presidio is supported for the following python versions:

  • 3.7
  • 3.8
  • 3.9
  • 3.10

PII anonymization on text

For PII anonymization on text, install the presidio-analyzer and presidio-anonymizer packages:

pip install presidio_analyzer
pip install presidio_anonymizer

# Presidio analyzer requires a spaCy language model.
python -m spacy download en_core_web_lg

For a more detailed installation of each package, refer to the specific documentation:

PII redaction in images

For PII redaction in images, install the presidio-image-redactor package:

pip install presidio_image_redactor

# Presidio image redactor uses the presidio-analyzer
# which requires a spaCy language model:
python -m spacy download en_core_web_lg

Click here for more information on the presidio-image-redactor package.

Using Docker

Presidio can expose REST endpoints for each service using Flask and Docker. To download the Presidio Docker containers, run the following command:


This requires Docker to be installed. Download Docker.

For PII anonymization in text

For PII detection and anonymization in text, the presidio-analyzer and presidio-anonymizer modules are required.

# Download images
docker pull
docker pull

# Run containers with default ports
docker run -d -p 5001:3000

docker run -d -p 5002:3000

For PII redaction in images

For PII detection in images, the presidio-image-redactor is required.

# Download image
docker pull

# Run container with the default port
docker run -d -p 5003:3000

Once the services are running, their APIs are available. API reference and example calls can be found here.

Install from source

To install Presidio from source, first clone the repo:

  • using HTTPS
git clone
  • Using SSH
git clone

Then, build the containers locally.


Presidio uses docker-compose to manage the different Presidio containers.

From the root folder of the repo:

docker-compose --build

To run all Presidio services:

docker-compose up -d

Alternatively, you can build and run individual services. For example, for the presidio-anonymizer service:

docker build ./presidio-anonymizer -t presidio/presidio-anonymizer

And run:

docker run -d -p 5002:5001 presidio/presidio-anonymizer

For more information on developing locally, refer to the setting up a development environment section.