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
$ 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
package if available.
If building LLVM on Ubuntu, the linker may report an error if the
development version of
libedit is not installed. Install
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.
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.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.
Validate your build by running the test suite: run
python -m llvmlite.tests. If everything works fine, install using
python setup.py install.