Installation de numba (python) sous Ubuntu 14.10 (Utopic)
(ça doit être pareil sous Ubuntu 14.04 j'imagine)
D'après https://github.com/numba/numba
, les dépendances python sont :
- llvmlite
- numpy (version 1.6 or higher)
- argparse (for pycc in python2.6)
- funcsigs (for Python 2)
Pour llvmlite
, il faut installer préalablement libedit
et llvm-3.5
sous Ubuntu
Généralement, numpy
et argparse
sont déjà installés.
Il manque enum34
si vous utilisez Python 2.
sudo apt-get install libedit-dev
sudo apt-get install llvm-3.5
sudo LLVM_CONFIG=`which llvm-config-3.5` pip install llvmlite
sudo pip install numpy
sudo pip install argparse
sudo pip install funcsigs
sudo pip install enum34
sudo pip install numba
Version de llvm
Attention, if faut llvm-config
(et donc llvm
) version 3.5 et pas 3.4
Pourquoi ? Parce que avant la version 3.5, llvm-config ne gère pas l'option --system-libs
$ llvm-config-3.5 --system-libs
-lz -lpthread -lffi -ledit -ltinfo -ldl -lm
$ llvm-config-3.4 --system-libs
usage: llvm-config <OPTION>... [<COMPONENT>...]
Get various configuration information needed to compile programs which use
LLVM. Typically called from 'configure' scripts. Examples:
llvm-config --cxxflags
llvm-config --ldflags
llvm-config --libs engine bcreader scalaropts
Options:
--version Print LLVM version.
--prefix Print the installation prefix.
--src-root Print the source root LLVM was built from.
--obj-root Print the object root used to build LLVM.
--bindir Directory containing LLVM executables.
--includedir Directory containing LLVM headers.
--libdir Directory containing LLVM libraries.
--cppflags C preprocessor flags for files that include LLVM headers.
--cflags C compiler flags for files that include LLVM headers.
--cxxflags C++ compiler flags for files that include LLVM headers.
--ldflags Print Linker flags.
--libs Libraries needed to link against LLVM components.
--libnames Bare library names for in-tree builds.
--libfiles Fully qualified library filenames for makefile depends.
--components List of all possible components.
--targets-built List of all targets currently built.
--host-target Target triple used to configure LLVM.
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).
Typical components:
all All LLVM libraries (default).
engine Either a native JIT or a bitcode interpreter.