11. Building Krptn

In case there aren’t any pre-built wheels on PyPI for your platform, you may need to build from source.


First, please try to pip install krptn to avoid building from source. Only build from source if you need to (if there aren’t any pre-built wheels on PyPI for your platform).

11.1. Building from source

To build Krptn, you will need:

  • A C++ compiler

  • Build tools required by VCPKG

11.1.1. Checkout Git Submodules

After cloning the repo from GitHub (and checking out your version using git tags), please checkout all submodules.

11.1.2. Setup Vcpkg


In order for Vcpkg to work on Linux you certain developer tools installed.

To use Vcpkg on Windows you need Visual Studio.

To use Vcpkg on MacOS you need Xcode command line tools.

Vcpkg is included as a git submodule. This is a C/C++ package manager which handles Krptn’s C dependencies. Please install Vcpkg up by running ./vcpkg/bootstrap-vcpkg.bat{l=shell} (for Windows) or ./vcpkg/bootstrap-vcpkg.sh{l=shell} (for Unix-like systems).


When installing Vcpkg on aarch64 Linux, you may encounter errors since Vcpkg will build from source.

To ensure that you are able to build Vcpkg on aarch64, you need to ensure that you install cmake, ninja, and export VCPKG_FORCE_SYSTEM_BINARIES=1{l=shell}.

Note that Vcpkg requires a new version of cmake which is not available in most package managers. You will likely need to build cmake from source if you are using aarch64.


When installing (and using) Vcpkg on musl libc based distributions (so Alpine Linux), you need to export VCPKG_FORCE_SYSTEM_BINARIES=1{l=shell}.

11.1.3. Install C packages

After setting up Vcpkg, you can install Krptn’s dependencies from vcpkg.json by running ./vcpkg/vcpkg install --triplet {your-triplet}{l=shell}.

Please substitute {your-triplet} with one of the following:

  • x64-windows-static for Windows x64 builds

  • arm64-windows-static for Windows ARM64 builds

  • x64-linux for Linux x64 builds

  • arm64-linux for Linux aarch64 builds

  • x64-osx for MacOS Intel x64 builds

  • arm64-osx for MacOS Apple Silicon builds

If you are using an platform which is not listed above, you need to manually find your triplet. We have not tested any other platforms apart from the above listed.

11.1.4. Install Krptn

pip install .

This will install Krptn.