Installing Numba from pip fails since Ubuntu 16.04 only has up through llvm-3.8 in its repositories.
As of version 0.16.0, llvmlite requires LLVM 3.9. It does not support earlier or later versions of LLVM.
Install LLVM-3.9 through the LLVM's Debian/Ubuntu packages (http://apt.llvm.org/).
Add:
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main
to /etc/apt/sources.list
or /etc/apt/sources.list.d/llvm.list
.
Add the PGP key, update package list and install llvm-3.9.
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
apt-get update
apt-get install llvm-3.9
Export the path to llvm-config-3.9 so the compiler llvmlite compiler can find it:
export LLVM_CONFIG=$(which llvm-config-3.9)
Install numba:
pip install numba
Hey, as of today,
llvmlite
depends on LLVM 6.0, and installingllvm-config
installed via apt-get does not work. LLVM will have to be built from source. Here are instructions:Full build is around 29Gb, not enough space in inbuilt memory on TX2. However, by passing the flags as shown below, the build size can come down to 1.3Gb.
This is compile the package. It should take around 3hrs or more.
LLVM will be installed to:
/usr/local/include/llvm