🔗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.
If you want to use ONNX model, just replace
pip install nexaai
withpip install "nexaai[onnx]"
in provided commands.If you want to upgrade to the latest version of Nexa SDK, just add
-U/--upgrade
afterpip install
in provided commands.For Chinese developers, we recommend you to use Tsinghua Open Source Mirror as extra index url, just replace
--extra-index-url https://pypi.org/simple
with--extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
in provided commands.
CPU
GPU (Metal)
For Metal (macOS):
GPU (CUDA)
For Linux:
For Windows PowerShell:
For Windows Command Prompt:
For Windows Git Bash:
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:
You can also install the required CUDA runtime libraries from PyPI distribution:
Verification
After installation, you can verify the installation by running:
This should print the basic information of the installed Nexa SDK.
Uninstallation
To remove Nexa SDK and its dependencies, run the following command:
Last updated