Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting python Numba working on Ubuntu 14.10 or Fedora 21 with python 2.7

Recently, I have had a frustrating time to get python Numba working on Ubuntu or Fedora Linux. The main problem has been with the compilation of llvmlite. What do I need to install for these to compile properly?

like image 705
mettw Avatar asked Feb 28 '15 13:02

mettw


2 Answers

The versions I got working at the end were numba-0.17.0 (also 0.18.2) and llvmlite-0.2.2 (also 0.4.0). Here are the relevant dependencies and configuration options on Ubuntu and Fedora.

For Ubuntu 14.04 *Trusty)

sudo apt-get install zlib1g zlib1g-dev libedit libedit-dev llvm-3.8 llvm-3.8-dev llvm-dev
sudo pip install enum34 funcsigs
LLVM_CONFIG=/usr/bin/llvm-config-3.8 pip install llvmlite --user
LLVM_CONFIG=/usr/bin/llvm-config-3.8 pip install numba --user

For Ubuntu 14.10

sudo apt-get install zlib1g zlib1g-dev libedit libedit-dev llvm-3.5 llvm-3.5-dev llvm-dev
pip install enum34 funcsigs
LLVM_CONFIG=/usr/bin/llvm-config-3.5 pip install llvmlite
LLVM_CONFIG=/usr/bin/llvm-config-3.5 pip install numba

For Ubuntu 15.04

sudo apt-get install zlib1g zlib1g-dev libedit2 libedit-dev llvm-3.6 llvm-3.6-dev llvm-dev
pip install enum34 funcsigs
LLVM_CONFIG=/usr/bin/llvm-config-3.6 pip install llvmlite
LLVM_CONFIG=/usr/bin/llvm-config-3.6 pip install numba

For Fedora 21

yum install zlib zlib-devel libstdc++-devel libstdc++ libstdc++-static llvm-3.5.0 llvm-devel-3.5.0 libedit libedit-devel
pip install enum34 funcsigs
LLVM_CONFIG=/usr/bin/llvm-config pip install llvmlite
LLVM_CONFIG=/usr/bin/llvm-config pip install numba

Note: this was originally posted by the OP in the question—moved here to keep this fit for SO.

like image 64
5 revs, 4 users 59% Avatar answered Nov 16 '22 20:11

5 revs, 4 users 59%


For ubuntu 15.10

fisrt check that pip has the correct version:

pip install --upgrade pip
pip install --upgrade wheel

pip >= 8.1

$ pip --version
pip 8.1.1 from
$ wheel version
wheel 0.29.0

apt-get install llvm stuff:

sudo apt-get install zlib1g zlib1g-dev libedit2 libedit-dev
sudo apt-get install llvm-3.7 llvm-3.7-dev llvm-dev

and then with pip (warning llvmlite work only with llvm 3.7):

pip install enum34 funcsigs
LLVM_CONFIG=/usr/bin/llvm-config-3.7 pip install llvmlite
LLVM_CONFIG=/usr/bin/llvm-config-3.7 pip install numba
like image 4
user3313834 Avatar answered Nov 16 '22 19:11

user3313834