Python · Installation

Installation

8.0.0-rc.1 · b1f866ab

From PyPI:

python -m pip install numkong

From a local checkout:

python -m pip install .

Quick runtime check:

python -c "import numkong as nk; print(repr(nk.cpu_capabilities_enabled()))"

§ Wheel Compatibility and Building from Source

Pre-built wheels are available on PyPI for Linux (x86_64, aarch64, riscv64, plus i686, ppc64le, s390x), macOS (x86_64, arm64), and Windows (AMD64, ARM64). Python 3.12 through 3.15 is supported, including the free-threaded 3.14t and 3.15t. Every wheel compiles each capability the toolchain supports and picks among them at runtime, so a single wheel covers all CPU generations on a given architecture.

When building from source, the compiler requirements depend on the platform. On macOS x86 only AVX2 is available; on macOS ARM NEON is always present, but SME requires Apple M4+ with Xcode 16+ (AppleClang 16+). RISC-V builds require Clang and LLD because GCC lacks zvfh, zvfbfwma, and zvbb support. On Windows, MSVC 19.44+ (Visual Studio 2022 17.14+) is recommended for full AVX-512 with FP16/BF16/VNNI. Build parallelism is controlled by CMAKE_BUILD_PARALLEL_LEVEL, which should be lowered in memory-constrained containers. There is no OpenMP dependency. Python-side parallelism uses the threads= argument on the GIL-free kernels, or concurrent.futures around them.

CMAKE_BUILD_PARALLEL_LEVEL=2 pip install . --no-build-isolation