PySDK Installation and Supported Configurations Guide

:mega: Please use the table of contents to navigate directly to the installation instructions relevant to your setup.

PySDK Supported Configurations

The table below lists operating systems, CPU architectures, and Python versions supported by latest released PySDK version.

Operating System Supported CPU Architectures Supported Python Versions
Ubuntu Linux 20.04, 22.04, 24.04 x86-64 3.8 … 3.12
Ubuntu Linux 20.04, 22.04, 24.04 ARM AArch64 3.8 … 3.12
Raspberry Pi OS (64 bit) ARM AArch64 3.9
Windows 10/11 x86-64 3.8 … 3.12
macOS 12 x86-64 3.9
macOS 12 ARM AArch64 3.9

Basic Installation of PySDK Python Package

It is recommended to install PySDK in a virtual environment. To simplify Python installation and package management, we recommend to use Miniconda. Please follow this link for Miniconda installation instructions.

Installation from PyPi.org

:white_check_mark: Install

To install DeGirum PySDK from PyPI.org use the following command:

python3 -m pip install degirum

:white_check_mark: Alternative Install

If python3 command for some reason is not available (typically under Windows Miniconda), try to either use pip directly, or use python :

pip install degirum
python -m pip install degirum

:white_check_mark: Clean Upgrade

To do clean upgrade to the most recent PySDK version use the following command:

python3 -m pip uninstall -y degirum && python3 -m pip install degirum

:white_check_mark: Clean Upgrade for PowerShell

If you use Windows PowerShell, change && to ; (you may also try to use pip command directly, if python3 command is not available):

(pip uninstall -y degirum) ; (pip install degirum)

:x: Failure

If during the installation you get the following errors:

ERROR: Could not find a version that the requirement degirum
ERROR: No matching distribution found for degirum

Then try to upgrade pip package by running the following command:

python3 -m pip install -U pip

On Windows, install the Visual C++ Redistributable for Visual Studio 2015 and above.

DeGirum Docker Images

For the ease of deployment, DeGirum provides Docker images for the DeGirum AI server and PySDK AI client installations.

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

OpenVINO™ Runtime in PySDK

PySDK supports OpenVINO™ versions 2022.1.1, 2023.2.0, 2023.3.0, and 2024.2.0. Version 2024.2.0 is recommended.

Linux Installation

On Linux, installation via APT Package Manager or via .tgz archive is supported.

:warning: NPU Requirement

Currently, NPU requires that OpenVINO™ be installed via .tgz archive.

OpenVINO™ Linux Installation via APT

To install OpenVINO™ via APT Package Manager, click this link to read installation instructions.

OpenVINO™ Linux Installation via Archive

To install OpenVINO™ via .tgz archive, click this link to read installation instructions.

:warning: Configuring Environment

If you installed OpenVINO™ via .tgz archive, whenever you open a new terminal to use any degirum command, make sure to run:

source <OpenVINO Directory>/setupvars.sh

When using PySDK in a python interpreter or a development environment, make sure to start the interpreter or environment from a terminal in which you’ve run this command.

Windows Installation

On Windows, installation via .zip archive is supported.

To install OpenVINO™ via .zip archive, click this link to read installation instructions.

:warning: Configuring Environment

Whenever you open a new terminal to use any DeGirum command, make sure to run:

<OpenVINO Directory>\setupvars.bat

When using PySDK in a Python interpreter or a development environment, make sure to start the interpreter or environment from a terminal in which you’ve run this command. Make sure to use basic Command Prompt, and not PowerShell to run this script.

GPU Drivers for OpenVINO™

To install Intel GPU drivers, click this link to read installation instructions.

:pencil2: Note

Currently, PySDK does not support any integrated GPUs.

NPU Drivers for OpenVINO™

The host system must have completed the NPU driver installation process to be able to use the NPU with OpenVINO™. As the drivers are updated at regular intervals, for maximum compatibility, it is recommended to always use the latest version.

The Linux NPU driver installation instructions are available via this link.

The Windows NPU driver is available via this link. The instructions are available at this link.

Sometimes, the NPU can be disabled in UEFI by default. Make sure it is enabled. The procedure for enabling the NPU varies based on the UEFI.

ONNX Runtime in PySDK

PySDK supports version 1.15.1 of ONNX Runtime, on Linux, Windows, and Mac.

To install the ONNX runtime, download a 1.15.1 archive for your system here. Do not use the “-training-” archives. Then, extract it into an appropriate directory:

  • On Windows, extract the archive to C:\Program Files, C:\Program Files (x86), or C:\ProgramData.
  • On Linux, extract the archive to /usr/local/.
  • On Mac, extract the archive to /usr/local/.

:warning: Directory Name

Do not rename the onnxruntime-<os>-<architecture>-1.15.1 directory after you extract it.

Verification

After installing third party runtimes and any needed device drivers, you can verify PySDK access to the runtimes and the devices by using the system information command:

degirum sys-info

The output should contain all the devices available to PySDK and some information about them. Devices are listed as <runtime>/<device type>, for example, ONNX/CPU for CPU access via ONNX, or OPENVINO/NPU for NPU access via OpenVINO™.

:mag: Example of DeGirum Sys-Info Output

Devices:
<other device types>
<runtime>/<device type>:
- '@Index': 0
  <device dependent information, optional>
- '@Index': 1
  <device dependent information, optional>
  <other devices>
<other device types>