Installation

Follow comprehensive installation guides for PySDK, covering virtual environments, Docker images, and verification.

Supported Environments

PySDK currently supports these operating systems, CPU architectures, and Python versions.

Operating System
Supported CPU Architectures
Supported Python Versions

Ubuntu Linux 20.04, 22.04, 24.04

x86-64

3.9 ... 3.12

Ubuntu Linux 20.04, 22.04, 24.04

ARM AArch64

3.9 ... 3.12

Raspberry Pi OS (64 bit)

ARM AArch64

3.9 ... 3.12

Windows 10/11

x86-64

3.9 ... 3.12

macOS

ARM AArch64

3.9

Supported Hardware

Below is a summary of what hardware we support, including the runtime, devices, and model binary formats.

Vendor
Runtime
Devices
Model Binary Format

Hailo

HAILORT

HAILO8, HAILO8L

.hef

DEEPX

DEEPX

M1A

.onnx

Intel

OPENVINO

CPU, GPU, NPU

.onnx, .bin & .xml

Axelera AI

AXELERA

Metis

.bin, .json, & .c

EdgeCortix

EDGECORTIX

SAKURA-II AI Accelerator

.plan, .json, & .bin

MemryX

MEMRYX

MX3

.dfp

BrainChip

AKIDA

NSoC_v2, AKD1500

.bin

Google

TFLITE

EDGETPU

.tflite

DeGirum

N2X

ORCA1

.n2x

Rockchip

RKNN

RK3588, RK3568, RK3566

.rknn

AMD

ONNX

VITIS_NPU

.onnx

NVIDIA

TENSORRT

DLA, GPU

.onnx

Installation Options

We recommend creating a Python virtual environment for PySDK and other DeGirum Python packages.

Open a command prompt or terminal, then follow the steps for your system below.

Windows

If Python is not installed, disable the Windows Python App Execution Alias before installing Python and PySDK. Ensure the Visual C++ Redistributable for Visual Studio 2015 or later is installed.

Disabling the Windows Python App Execution Alias and Installing Python on Windows
  1. Locate the Alias: By default, Windows will overwrite python with Python from the Microsoft Store when entered in a terminal. Search for App Execution Alias in Windows Settings and disable both python.exe and python3.exe aliases.

Windows Python App Execution Aliases for python.exe and python3.exe .
  1. Install a Python version supported by PySDK: After disabling the App Execution Alias, install Python from the official Python website or with winget. When installing with winget, include both Python.Python.<version> and Python.Launcher.

Installing PySDK in a Python Virtual Environment on Windows

Ensure a supported Python version is installed, then watch the video or follow the steps below:

Windows Installation
1

Create a Python Virtual Environment

Use this command to create a virtual environment with the default Python installation:

Alternatively, with Python Launcher (explicit 3.12):

2

Activate the Python Virtual Environment

After creating the environment with venv, navigate to the Scripts folder in your virtual environment.

Once in that folder, run the activation command.

On cmd.exe:

On pwsh.exe:

After activation, the virtual environment name appears before the terminal prompt.

PowerShell terminal with an active degirum-windows virtual environment
3

Install PySDK with pip install

With the environment active, use pip to install PySDK and optionally degirum-tools. The PySDK package is degirum, while degirum-tools helps you build AI applications with PySDK.

To install only PySDK:

To install both PySDK and degirum-tools:

4

Verify PySDK Installation

Run this command in the active virtual environment:

Example output:

A list of detected devices confirms that PySDK is installed.

Linux

Ensure a Python version supported by PySDK is installed.

Installing Python on Linux

Commands vary by distribution. Use these examples as a guide.

For Ubuntu 24.04:

Update package lists and upgrade installed packages. Then, install Python and the venv module.

For Raspberry Pi OS:

You should only need to update package lists and upgrade installed packages. Python 3 is preinstalled on 64-bit Raspberry Pi OS.

1

Create a Python Virtual Environment

Use this command to create a virtual environment:

Alternatively, to target Python 3.12 explicitly:

2

Activate the Python Virtual Environment

After creating the environment with venv, activate it:

After activation, the virtual environment name appears before the terminal prompt.

Terminal with an active degirumvirtual environment
3

Install PySDK with pip install

With the environment active, use pip to install PySDK and optionally degirum-tools. The PySDK package is degirum, while degirum-tools helps you build AI applications with PySDK.

To install only PySDK:

To install both PySDK and degirum-tools:

4

Verify PySDK Installation

Run this command in the active virtual environment:

Example output:

A list of detected devices confirms that PySDK is installed.

Docker Images

We also provide Docker images for DeGirum AI server and PySDK AI client installations.

Follow this GitHub link to DeGirum Docker repo for details on how to run these images and for corresponding source Dockerfiles.

Runtimes and Drivers

We support multiple hardware options and runtime environments. PySDK comes with support for N2X and TFLite runtimes. Follow this link for more details.

Limiting Runtime Plugin Loading

PySDK searches for runtime plugins at startup. To restrict which plugins load, set the DG_PLUGINS_ALLOWED environment variable to a list of plugin prefixes separated by any non alphanumeric character. For example:

Only plugins with prefixes in the list load when DG_PLUGINS_ALLOWED is set. If the variable is not defined, all available plugins load as before.

Supported plugin prefixes include hailort_runtime_agent, openvino_runtime_agent, axelera_runtime_agent, memryxrt_runtime_agent, akida_runtime_agent, tflite_runtime_agent, n2x_runtime_agent, rknn_runtime_agent, onnx_runtime_agent, and tensorrt_runtime_agent.

Verification

After installing runtimes and device drivers, verify PySDK on Windows 11 or Ubuntu 24.04 by running:

Example output (PowerShell, Windows):

Example output (Linux):

Troubleshooting

If you encounter errors such as:

Create a new virtual environment and reinstall PySDK.

You can also try upgrading pip with this command:

On Windows, confirm that the Visual C++ Redistributable for Visual Studio 2015 or later is installed.

Last updated

Was this helpful?