Skip to main content

Installation

Version note

Starting with XenseSDK 2.2.0, ONNX Runtime (onnxruntime-gpu) and CUDA are no longer required. For version 2.2.0 and later, follow the steps below. For older versions, see the legacy installation instructions at the end of this page.

1. Create a Python environment​

Anaconda is recommended for creating the Python environment. XenseSDK currently supports Python 3.9 through 3.12; the example below uses Python 3.9.19 to match the project examples:

conda create -n xenseenv python=3.9.19
conda activate xenseenv

2. Install XenseSDK (2.2.0 and later)​

Install from PyPI:

pip install 'xensesdk[viz]>=2.2.0'

When installing from a local wheel, choose version 2.2.0 or later and a file matching your Python, OS, and architecture:

pip install 'xensesdk-x.y.z-cp39-cp39-win_amd64.whl[viz]'

Installation options:

Installation commandInstalled componentsWhen to use it
pip install xensesdkCore functionalityWhen visualization is not required
pip install 'xensesdk[viz]'Core functionality + visualization dependenciesRecommended full installation

3. Verify installation​

Run the following command to verify that the SDK can be imported and scan for sensors:

python -c "from xensesdk import Sensor; print(Sensor.scanSerialNumber())"
Empty scan result

Check USB connectivity, device permissions, compute-unit networking, and sensor configuration files first.

Legacy installation (before 2.2.0)​

Show legacy ONNX Runtime, CUDA, and cuDNN installation steps

The following steps apply only to XenseSDK versions earlier than 2.2.0.

Install CUDA and cuDNN​

CUDA Toolkit and cuDNN are not installed automatically with XenseSDK and must be installed and configured separately for your environment. For GPU inference, their versions must be compatible with onnxruntime-gpu. The verified reference environment uses CUDA 11.8 + cuDNN 8.9.2.26; for other environments, follow the release notes and GPU driver compatibility.

conda search cudnn
conda search cudatoolkit
conda install cudnn==8.9.2.26 cudatoolkit==11.8.0

On Linux, if the dynamic libraries are not found at runtime, you can temporarily set:

export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$CONDA_PREFIX/lib64:$LD_LIBRARY_PATH"

Without an NVIDIA GPU, you can first disable inference and verify the communication and data paths by passing disable_infer=True to Sensor.create. Use infer_mode or overrides when you need to switch inference size or mode.

Install the legacy SDK​

For legacy versions that need local ONNX inference and visualization, use the full installation. Replace x.y.z with the legacy version you need (earlier than 2.2.0):

pip install 'xensesdk[full]==x.y.z'

When installing from a local wheel, choose the file matching your Python, OS, and architecture:

pip install 'xensesdk-x.y.z-cp39-cp39-win_amd64.whl[full]'

Legacy versions provide the following installation options. Append ==x.y.z to install the intended legacy version:

Installation commandInstalled componentsWhen to use it
pip install xensesdkCore dependencies onlyWhen local ONNX inference and built-in visualization are not required
pip install 'xensesdk[onnx]'Core dependencies + onnxruntime-gpuWhen local ONNX inference is required but built-in visualization is not
pip install 'xensesdk[viz]'Core dependencies + OpenGL, Assimp, and ImGui visualization dependenciesWhen built-in visualization is required but local ONNX inference is not
pip install 'xensesdk[full]'Core dependencies + ONNX inference + visualization dependenciesRecommended full installation