Compatibility
Numba is compatible with Python 3.7–3.10, and Numpy versions 1.18 up to 1.23.
Our supported platforms are:
- Linux x86 (32-bit and 64-bit)
- Linux ppcle64 (POWER8, POWER9)
- Windows 7 and later (32-bit and 64-bit)
- OS X 10.9 and later (64-bit and unofficial support on M1/Arm64)
- *BSD (unofficial support only)
- NVIDIA GPUs of compute capability 5.3 and later
- Compute capabilities 3.5 - 5.2 are supported, but deprecated.
- ARMv7 (32-bit little-endian, such as Raspberry Pi 2 and 3)
- ARMv8 (64-bit little-endian, such as the NVIDIA Jetson)
Automatic parallelization with @jit is only available on 64-bit platforms.
Installing using conda on x86/x86_64/POWER Platforms
The easiest way to install Numba and get updates is by using conda, a cross-platform package manager and software distribution maintained by Anaconda, Inc. You can either use Anaconda to get the full stack in one download, or Miniconda which will install the minimum packages required for a conda environment.
Once you have conda installed, just type:
$ conda install numba
Note that Numba, like Anaconda, only supports PPC in 64-bit little-endian mode.
To enable CUDA GPU support for Numba, install the latest graphics drivers from NVIDIA for your platform. (Note that the open source Nouveau drivers shipped by default with many Linux distributions do not support CUDA.) Then install the cudatoolkit package:
$ conda install cudatoolkit
You do not need to install the CUDA SDK from NVIDIA.
Installing using pip on x86/x86_64 Platforms
Binary wheels for Windows, Mac, and Linux are also available from PyPI. You can install Numba using pip:
$ pip install numba
This will download all of the needed dependencies as well. You do not need to have LLVM installed to use Numba (in fact, Numba will ignore all LLVM versions installed on the system) as the required components are bundled into the llvmlite wheel.
To use CUDA with Numba installed by pip, you need to install the CUDA SDK from NVIDIA. Please refer to Setting CUDA Installation Path for details. Numba can also detect CUDA libraries installed system-wide on Linux.
Installing on Linux ARMv7 Platforms
Berryconda is a conda-based Python distribution for the Raspberry Pi. We are now uploading packages to the numba channel on Anaconda Cloud for 32-bit little-endian, ARMv7-based boards, which currently includes the Raspberry Pi 2 and 3, but not the Pi 1 or Zero. These can be installed using conda from the numba channel:
$ conda install -c numba numba
Berryconda and Numba may work on other Linux-based ARMv7 systems, but this has not been tested.
Installing on Linux ARMv8 (AArch64) Platforms
We build and test conda packages on the NVIDIA Jetson TX2, but they are likely to work for other AArch64 platforms. (Note that while the Raspberry Pi CPU is 64-bit, Raspbian runs it in 32-bit mode, so look at Installing on Linux ARMv7 Platforms instead.)
Conda-forge support for AArch64 is still quite experimental and packages are limited, but it does work enough for Numba to build and pass tests. To set up the environment:
- Install miniforge. This will create a minimal conda environment.
- Then you can install Numba from the numba channel:
$ conda install -c numba numba
On CUDA-enabled systems, like the Jetson, the CUDA toolkit should be automatically detected in the environment.
Installing from source
Installing Numba from source is fairly straightforward (similar to other Python packages), but installing llvmlite can be quite challenging due to the need for a special LLVM build. If you are building from source for the purposes of Numba development, see Build environment for details on how to create a Numba development environment with conda.
If you are building Numba from source for other reasons, first follow the llvmlite installation guide. Once that is completed, you can download the latest Numba source code from Github:
$ git clone git://github.com/numba/numba.git
Source archives of the latest release can also be found on PyPI. In addition to llvmlite, you will also need:
- A C compiler compatible with your Python installation. If you are using Anaconda, you can use the following conda packages:
- Linux x86: gcc_linux-32 and gxx_linux-32
- Linux x86_64: gcc_linux-64 and gxx_linux-64
- Linux POWER: gcc_linux-ppc64le and gxx_linux-ppc64le
- Linux ARM: no conda packages, use the system compiler
- Mac OSX: clang_osx-64 and clangxx_osx-64 or the system compiler at /usr/bin/clang (Mojave onwards)
- Mac OSX (M1): clang_osx-arm64 and clangxx_osx-arm64
- Windows: a version of Visual Studio appropriate for the Python version in use
- NumPy
Then you can build and install Numba from the top level of the source tree:
$ python setup.py install
Version support information
This is the canonical reference for information concerning which versions of Numba’s dependencies were tested and known to work against a given version of Numba. Other versions of the dependencies (especially NumPy) may work reasonably well but were not tested. The use of x in a version number indicates all patch levels supported.
Checking your installation
You should be able to import Numba from the Python prompt:
$ python
Python 3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numba
>>> numba.__version__
'0.55.1'
You can also try executing the numba --sysinfo (or numba -s for short) command to report information about your system capabilities. See Command line interface for further information.
$ numba -s
System info:
--------------------------------------------------------------------------------
__Time Stamp__
Report started (local time) : 2022-09-27 11:03:57.685684
UTC start time : 2022-09-27 11:03:57.685687
Running time (s) : 3.332162
__Hardware Information__
Machine : x86_64
CPU Name : cascadelake
CPU Count : 36
Number of accessible CPUs : 32
List of accessible CPUs cores : 0-35
CFS Restrictions (CPUs worth of runtime) : None
CPU Features : 64bit adx aes avx avx2 avx512bw
avx512cd avx512dq avx512f avx512vl
avx512vnni bmi bmi2 clflushopt
clwb cmov cx16 cx8 f16c fma
fsgsbase fxsr invpcid lzcnt mmx
movbe pclmul popcnt prfchw rdrnd
rdseed sahf sse sse2 sse3 sse4.1
sse4.2 ssse3 xsave xsavec xsaveopt
xsaves
Memory Total (MB) : 257434
Memory Available (MB) : 254472
__OS Information__
Platform Name : Linux-5.4.0-125-generic-x86_64-with-glibc2.17
Platform Release : 5.4.0-125-generic
OS Name : Linux
OS Version : #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022
OS Specific Version : ?
Libc Version : glibc 2.31
__Python Information__
Python Compiler : GCC 7.5.0
Python Implementation : CPython
Python Version : 3.8.13
Python Locale : en_US.UTF-8
__Numba Toolchain Versions__
Numba Version : 0.55.1
llvmlite Version : 0.38.0
__LLVM Information__
LLVM Version : 11.1.0
__CUDA Information__
CUDA Device Initialized : True
CUDA Driver Version : (11, 4)
CUDA Runtime Version : 11030
CUDA NVIDIA Bindings Available : False
CUDA NVIDIA Bindings In Use : False
CUDA Detect Output:
Found 3 CUDA devices
id 0 b'NVIDIA GeForce RTX 3090' [SUPPORTED]
Compute Capability: 8.6
PCI Device ID: 0
PCI Bus ID: 25
UUID: GPU-59928c1e-a6d5-c16c-742b-570a731143ee
Watchdog: Disabled
FP32/FP64 Performance Ratio: 32
id 1 b'NVIDIA GeForce RTX 3090' [SUPPORTED]
Compute Capability: 8.6
PCI Device ID: 0
PCI Bus ID: 27
UUID: GPU-362e9179-e4a7-44c0-46d3-7406119620b0
Watchdog: Disabled
FP32/FP64 Performance Ratio: 32
id 2 b'NVIDIA GeForce RTX 3090' [SUPPORTED]
Compute Capability: 8.6
PCI Device ID: 0
PCI Bus ID: 104
UUID: GPU-ac5e1ef4-7754-33f1-0011-a12368917afc
Watchdog: Disabled
FP32/FP64 Performance Ratio: 32
Summary:
3/3 devices are supported
CUDA Libraries Test Output:
Finding nvvm from Conda environment
named libnvvm.so.4.0.0
trying to open library... ok
Finding cudart from Conda environment
named libcudart.so.11.3.109
trying to open library... ok
Finding cudadevrt from Conda environment
named libcudadevrt.a
Finding libdevice from Conda environment
searching for compute_20... ok
searching for compute_30... ok
searching for compute_35... ok
searching for compute_50... ok
__SVML Information__
SVML State, config.USING_SVML : False
SVML Library Loaded : False
llvmlite Using SVML Patched LLVM : True
SVML Operational : False
__Threading Layer Information__
TBB Threading Layer Available : True
+-->TBB imported successfully.
OpenMP Threading Layer Available : True
+-->Vendor: GNU
Workqueue Threading Layer Available : True
+-->Workqueue imported successfully.
__Numba Environment Variable Information__
None found.
__Conda Information__
Conda Build : 3.21.8
Conda Env : 4.12.0
Conda Platform : linux-64
Conda Python Version : 3.9.12.final.0
Conda Root Writable : True
__Installed Packages__
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
blas 1.0 mkl
ca-certificates 2022.07.19 h06a4308_0
certifi 2022.9.14 py38h06a4308_0
cudatoolkit 11.3.1 h2bc3f7f_2
intel-openmp 2021.4.0 h06a4308_3561
ld_impl_linux-64 2.38 h1181459_1
libffi 3.3 he6710b0_2
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libllvm11 11.1.0 h9e868ea_5
libstdcxx-ng 11.2.0 h1234567_1
llvmlite 0.38.0 py38h4ff587b_0
mkl 2021.4.0 h06a4308_640
mkl-service 2.4.0 py38h7f8727e_0
mkl_fft 1.3.1 py38hd3c417c_0
mkl_random 1.2.2 py38h51133e4_0
ncurses 6.3 h5eee18b_3
numba 0.55.1 py38h51133e4_0
numpy 1.21.5 py38h6c91a56_3
numpy-base 1.21.5 py38ha15fc14_3
openssl 1.1.1q h7f8727e_0
pip 22.1.2 py38h06a4308_0
python 3.8.13 h12debd9_0
readline 8.1.2 h7f8727e_1
setuptools 63.4.1 py38h06a4308_0
six 1.16.0 pyhd3eb1b0_1
sqlite 3.39.2 h5082296_0
tbb 2021.5.0 hd09550d_0
tk 8.6.12 h1ccaba5_0
wheel 0.37.1 pyhd3eb1b0_0
xz 5.2.5 h7f8727e_1
zlib 1.2.12 h5eee18b_3
No errors reported.
'Programming > Python' 카테고리의 다른 글
[Python] 비동기 프로그래밍에서 asyncio.Event 사용하기 (0) | 2023.09.08 |
---|---|
[Python] 효과적인 디버깅, 모니터링이 가능한 Python Logging (0) | 2023.09.07 |
[Python] 2개의 Dictionary 합치는 방법 (0) | 2023.09.07 |
Python 알고리즘 Quick books (0) | 2022.08.03 |