Installing the Agent on Your Linux Device

You use the Python package manager, pip, to install the agent and the required dependencies on your device.

The pip package manager is normally included with Python and automatically installs all dependencies.

This procedure installs the device cloud agent package from the PyPI Python repository. Installing from the repository ensures that you have the latest supported release of the agent and dependencies.

You need the following:

  • a supported release of Python, including the pip package manager, installed on your device

  • super user privileges on your device

Open a terminal window and install the agent and dependencies.
$sudo -H pip install --upgrade device-cloud
 ... 
Installing collected packages:  device-cloud 
Successfully installed device-cloud-18.4.2
$ pip show device-cloud
Name: device-cloud Version: 18.4.2 
Summary: Python library for Device Cloud 
Home-page: https://www.telit.com/m2m-iot-products/
Author: John Doe
Author-email: john.doe@telit.com 
License: Apache License,Version 2.0 
Location:/home/user/test-device-cloud/lib/python2.7/site-packages 
Requires:requests, simplejson, websocket, PySocks, queues, urllib3, certifi, websocket-client, paho-mqtt

The agent and required dependencies are installed from the PyPi repository in the directory shown in the Location entry in the output. Depending on how Python is set up on your device, the location may be the global site-packages, the global dist-packages, or your local site-packages directory.

The source code for applications and examples is stored in the /usr/local/share/device_cloud directory.

If you have issues installing the agent or running the steps in the next sections, see Troubleshooting Installation Issues with the Python Agent.