Install the Qualcomm Neural Processing SDK

The following steps will walk you through the installation of Qualcomm® Neural Processing SDK. These steps have been tested on Version 2.5.x. SDK which is supported only on Ubuntu 18.0.4.

  1. Configure nameserver.echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
  2. Install pip and pip3.$ sudo apt-get update
    $ sudo apt install python-pip
    $ sudo apt install python3-pip
    $ pip3 install --upgrade pip
    $ sudo apt-get update
  3. Set python3.6 as the default python version.$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
    $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
  4. Install DNN frameworks.
    Qualcomm Neural Processing SDK has been tested only with certain versions of the AI Frameworks. So, it is recommended to use these versions. However other versions might work as well. Refer to the setup.html in SDK for more details. Refer to Install frameworks for Qualcomm Neural Processing SDK
  5. Install Android NDK.
    1. Qualcomm Neural Processing SDK is tested with Android NDK version r25c. It should be available for download from this link. Unzip the downloaded file and update the following environment variable:export ANDROID_NDK_ROOT= <path_to_android_ndk>
    2. Set up the Qualcomm Neural Processing SDK. Extract the SNPE SDK to a directory. This directory is referred to as $SNPE_ROOT.
      Note the use of X.Y.Z in this section. It refers to the release zip that is in use, e.g., snpe-1.0.0.zip.unzip -X snpe-X.Y.Z.zip
    3. Install the following dependencies:$ pip install numpy==1.18.5
      $ pip install sphinx==2.2.1
      $ pip install matplotlib==3.0.3
      $ pip install scikit-image==0.15.0
      $ pip install mako
      $ sudo apt install clang
    4. Run the dependencies script to check the system for Ubuntu package dependencies. It will ask to install the ones that are missing. Install the missing packages.source snpe-X.Y.Z/bin/dependencies.sh
    5. Run the Python dependency checker to check the system for Python package dependencies. Install the missing packages.source snpe-X.Y.Z/bin/check_python_depends.sh
    6. Setup SNPE_ROOT environmental variable and add it to PATH.
      This step is taken care of when you run bin/envsetup.sh from the SDK root directory.
  6. Set installation paths for the Frameworks using the following commands.
    For example, Installation path of tensorflow can be obtained using “Pip show tensorflow”. Add “/ tensorflow” to the path obtained.source bin/envsetup.sh --tflite /TFLite/Dir/
    source bin/envsetup.sh -p /torch/Dir/
    source bin/envsetup.sh -t /tensorflow/Dir
    source bin/envsetup.sh -o /onnx/Dir
    source bin/envsetup.sh -c /caffe/Dir
    source bin/envsetup.sh -f /caffe2/Dir


Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries.