Skip to content

Instantly share code, notes, and snippets.

@dapperfu
Last active July 1, 2020 13:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dapperfu/ba40ff83523296bc8355f05befb28da9 to your computer and use it in GitHub Desktop.
Save dapperfu/ba40ff83523296bc8355f05befb28da9 to your computer and use it in GitHub Desktop.
Installing Numba (requiring llvm) on Ubuntu 16.04

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
@bara495
Copy link

bara495 commented Feb 19, 2020

Hello @MiaoDX,
I don't really care which llvm it is, I just want to get numba (librosa) working.
If it is possible without building which takes a long looong time, please give a bit more detailed description it would help a lot of people struggling with librosa!!
Kind regards!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment