# Install  Qualcomm®  Neural Processing SDK for AI

Source: [https://docs.qualcomm.com/doc/80-63195-1/topic/Install-Qualcomm-Neural-Processing-SDK-for-AI.html](https://docs.qualcomm.com/doc/80-63195-1/topic/Install-Qualcomm-Neural-Processing-SDK-for-AI.html)

Install frameworks and dependencies for  Qualcomm®  Neural
    Processing SDK for AI.

## About this task
These procedures have been verified on version 2.5.x.  Qualcomm® 
      Neural Processing SDK for AI is supported on Ubuntu 18.0.4.

## Procedure

1. Configurenameserver.
        
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/nullCopy to clipboard
2. Installpip and pip3.
        
sudo apt-get update
        sudo apt install python-pip 
        sudo apt install python3-pip 
        pip3 install --upgrade pip 
        sudo apt-get update
        Copy to clipboard
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
        Copy to clipboard
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 the 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 [https://github.com/android/ndk/wiki/Unsupported-Downloads#ndk-17c-downloads](https://github.com/android/ndk/wiki/Unsupported-Downloads#ndk-17c-downloads).
              Unzip the downloaded file and update the following environment variable.
            
export ANDROID_NDK_ROOT=Copy to clipboard
    2. Setup 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`inthis section. It refers to the release zip
              that is in use, e.g.`,
              snpe-1.0.0.zip`.

            unzip -X snpe-X.Y.Z.zipCopy to clipboard
    3. Install 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
            Copy to clipboard
    4. Run the dependencies script to check the system for Ubuntu package dependencies.
              You will be prompted to install any missing dependencies.
            
source snpe-X.Y.Z/bin/dependencies.shCopy to clipboard
    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.shCopy to clipboard
    6. Setup `SNPE_ROOT` environmentalvariable and add it to PATH.
            
This step is taken care of when you run `bin/envsetup.sh` from the
              SDK root directory.
6. Set nstallation paths for the Frameworks using the following commands
        
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
        Copy to clipboard

Installation path of tensorflow can be obtained using “Pip show tensorflow”. Add “/
            tensorflow” to the path obtained.

- **[Install DNN frameworks](https://docs.qualcomm.com/doc/80-63195-1/topic/Install-DNN-frameworks.html)**  

Once you are done setting up the  Qualcomm®  Neural Processing SDK     and relevant frameworks, you can proceed to converting your models to [DLC](https://docs.qualcomm.com/doc/80-63195-1/topic/Deep-Learning-Container--DLC-.html) format.

**Parent Topic:** [Qualcomm Neural Processing SDK for AI](https://docs.qualcomm.com/doc/80-63195-1/topic/Qualcomm-Neural-Processing-SDK-for-AI.html)

Last Published: May 16, 2024

[Previous Topic
Qualcomm Neural Processing SDK for AI](https://docs.qualcomm.com/bundle/publicresource/80-63195-1/topics/Qualcomm-Neural-Processing-SDK-for-AI.md) [Next Topic
Install DNN frameworks](https://docs.qualcomm.com/bundle/publicresource/80-63195-1/topics/Install-DNN-frameworks.md)