2. Installing

2.1. Pre-built binaries

For your own convenience, we recommend you install the pre-built binaries provided for the Conda package manager. Official binaries are available in the Anaconda distribution; to install them, simply type:

$ conda install llvmlite

If you want a more recent version, you can also fetch the automatic builds available on Numba‘s binstar channel:

$ conda install --channel numba llvmlite

If don’t want to use Conda, or modified llvmlite yourself, you will need to build it.

2.2. Building manually

2.2.1. Prerequisites (UNIX)

You must have a LLVM 4.0 build (libraries and header files) available somewhere.

Under a recent Ubuntu or Debian system, you may install the llvm-4.0-dev package if available.

If building LLVM on Ubuntu, the linker may report an error if the development version of libedit is not installed. Install libedit-dev if you run into this problem.

2.2.2. Prerequisites (Windows)

You must have Visual Studio 2015 or later (the free “Express” edition is ok) in order to compile LLVM and llvmlite. In addition, you must have cmake installed, and LLVM should have been built using cmake, in Release mode. Be careful to use the right bitness (32- or 64-bit) for your Python installation.

2.2.3. Compiling

Run python setup.py build. This builds the llvmlite C wrapper, which embeds a statically-linked copy of the required subset of LLVM.

If your LLVM is installed in a non-standard location, first set the LLVM_CONFIG environment variable to the location of the corresponding llvm-config (or llvm-config.exe) executable. For example if LLVM is installed in /opt/llvm/ with the llvm-config binary located at /opt/llvm/bin/llvm-config then set LLVM_CONFIG=/opt/llvm/bin/llvm-config. This variable must be persisted through into the installation of llvmlite e.g. into a python environment.

2.2.4. Installing

Validate your build by running the test suite: run python runtests.py or python -m llvmlite.tests. If everything works fine, install using python setup.py install.