🔗Installation
Install Nexa SDK as a Python Package with CLI
Nexa SDK is a versatile toolkit that runs on multiple platforms (Linux, macOS, Windows) and supports various acceleration backends (CUDA, Metal, onnxruntime). This guide provides comprehensive instructions for installing Nexa SDK on your device.
Prerequisites
Before installation, ensure you have the following:
Python 3.7 or higher (Recommended)
pip/pip3 (Python package installer)
Installation
We have released pre-built wheels for various , platforms, and backends for convenient installation on our index page.
CPU
pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cpu --extra-index-url https://pypi.org/simple --no-cache-dir
GPU (Metal)
For Metal (macOS):
CMAKE_ARGS="-DGGML_METAL=ON -DSD_METAL=ON" pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/metal --extra-index-url https://pypi.org/simple --no-cache-dir
GPU (CUDA)
For Linux:
CMAKE_ARGS="-DGGML_CUDA=ON -DSD_CUBLAS=ON" pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cu124 --extra-index-url https://pypi.org/simple --no-cache-dir
For Windows PowerShell:
$env:CMAKE_ARGS="-DGGML_CUDA=ON -DSD_CUBLAS=ON"; pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cu124 --extra-index-url https://pypi.org/simple --no-cache-dir
For Windows Command Prompt:
set CMAKE_ARGS="-DGGML_CUDA=ON -DSD_CUBLAS=ON" & pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cu124 --extra-index-url https://pypi.org/simple --no-cache-dir
For Windows Git Bash:
CMAKE_ARGS="-DGGML_CUDA=ON -DSD_CUBLAS=ON" pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cu124 --extra-index-url https://pypi.org/simple --no-cache-dir
Choosing Between CPU and GPU Versions
it's important to choose the right version of Nexa SDK for your system. Nexa SDK is compatible with all operating systems.
CPU Version Choose this version if You don't have a compatible GPU.
GPU Version Choose this version if:
You have a compatible NVIDIA GPU (for CUDA acceleration on Linux/Windows)
You're using a Mac with Apple Silicon (M1, M2, or later chips) for Metal acceleration
You're planning to run computationally intensive tasks (image, vlm) that can benefit from GPU acceleration
The GPU version can significantly speed up certain operations, but requires additional setup and compatible hardware. For NVIDIA GPUs (Linux/Windows), ensure you have a CUDA-capable NVIDIA GPU and install CUDA Toolkit 12.0 or later. Check your CUDA version by running:
nvcc --version
You can also install the required CUDA runtime libraries from PyPI distribution:
pip install nvidia-cuda-runtime-cu12 nvidia-cublas-cu12
Verification
After installation, you can verify the installation by running:
pip show nexaai
This should print the basic information of the installed Nexa SDK.
Uninstallation
To remove Nexa SDK and its dependencies, run the following command:
pip uninstall nexaai
Last updated
Was this helpful?