Skip to main content

Installation

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 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.

3. Install the package​

The recommended default is the full installation, which includes the core features, local ONNX inference, and visualization:

pip install 'xensesdk[full]'

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]'

The current package provides the following installation options:

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
Verify after installation

Run python -c "from xensesdk import Sensor; print(Sensor.scanSerialNumber())". If the result is empty, check USB connectivity, device permissions, compute-unit networking, and sensor configuration files.