For your convenience, you can install llvmlite using the pre-built binaries provided for the conda package manager.
If do not want to use conda or if you modified llvmlite yourself, you need to build it manually.
Official binaries are available in the Anaconda® distribution.
Before building, you must have the following:
- Visual Studio 2015 or later, to compile LLVM and llvmlite. The free Express edition is acceptable.
- CMake installed.
- LLVM built using CMake in Release mode.
Be sure to use the correct bit format—either 32-bit or 64-bit—for your Python installation.
- An LLVM 6.0 build—libraries and header files—available somewhere.
- On recent Ubuntu or Debian systems, you may install the
llvm-6.0-devpackage, if it is available.
- If building LLVM on Ubuntu, the linker may report an error
if the development version of
libeditis not installed. If you run into this problem, install
To build the llvmlite C wrapper, which embeds a statically linked copy of the required subset of LLVM, run:
python setup.py build
If your LLVM is installed in a nonstandard location, set the
LLVM_CONFIGenvironment variable to the location of the corresponding
llvm-config.exeexecutable. This variable must persist into the installation of llvmlite—for example, into a Python environment.
EXAMPLE: If LLVM is installed in
llvm-configbinary located at
To validate your build, run the test suite by running:
python -m llvmlite.tests
If the validation is successful, install by running:
python setup.py install