Logo

Download
Installation

Installing PyThemis #

PyThemis is available on PyPi and can be installed with the usual pip install. Additionally, Themis Core library has to be installed in your system as well.

Themis Core is available as a system package for Linux and macOS. Usually you want to install the stable package to benefit from automatic dependency management and security updates. However, you can also build and install the latest PyThemis from the source code.

Installing stable version on Linux #

The easiest way to install Themis on Linux is to use package repositories for your system. We build packages for a multitude of Linux distributions.

  1. Add Cossack Labs package repositories

    to your system.

  2. Install Themis Core development package.

    For Debian, Ubuntu:

    sudo apt install libthemis-dev
    

    For CentOS, RHEL:

    sudo yum install libthemis-devel
    
  3. Install PyThemis via PyPi:

    pip install pythemis
    

    You may need sudo for global installation, if you are not using virtual environments.

Once PyThemis is installed, you can try out code examples.

Installing stable version on macOS #

The easiest way to install Themis on macOS is to use Homebrew.

  1. Add Cossack Labs tap to your system:

    brew tap cossacklabs/tap
    
  2. Install Themis Core package:

    brew install libthemis
    
  3. Install PyThemis via PyPi:

    pip install pythemis
    

Once PyThemis is installed, you can try out code examples.

Building latest version from source #

If the stable package version does not suit your needs, you can manually build and install the latest version of Themis from source code.

  1. Build and install Themis Core library into your system.

  2. Install PyThemis package from the source code:

    make pythemis_install
    

    The package will be installed globally into the system.

  3. Run PyThemis test suite to verify the installation:

    make prepare_tests_all test_python