Installing the Agent on Your Windows 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.

Depending on how you installed Python, you may need to specify the full path to the directory when you run the pip package manager.

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 a supported release of Python, including the pip package manager, installed on your device.

  1. Open a Command Prompt window.

    Depending on where you installed Python, you may need to open the window as administrator.

  2. From the command line, install the agent and dependencies.

    The following example assumes that the Python installation directory is in the system path.

    If you need to specify the full path to pip, it is typically pythonInstallDir\Scripts\pip.

    C:\> pip install --upgrade device_cloud
    
        ...
    
    Installing collected packages: device-cloud
    Successfully installed device-cloud-18.4.2
    C:> 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: c:\users\user1\appdata\local\programs\python\python36\lib\site-packages
    Requires: certifi, websocket, paho-mqtt, urllib3, websocket-client, PySocks, requests, simplejson, queues
    Note:

    When using a proxy server on Windows 10, if the websocket fails to connect to the device console or remote access, specify the proxy configuration information in the websocket-client package, for example, the socket type must be stream or datagram, do not use 0. See Troubleshooting Installation Issues with the Python Agent.

    The agent and required dependencies are installed from the PyPi repository in the location shown in the Location entry in the output, and the source code for applications and examples is stored in the share\device_cloud directory under the Python installation directory. In the example above, the Python installation directory is c:\users\user1\appdata\local\programs\python\python36 and the source code is located in the c:\users\user1\appdata\local\programs\python\python36\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.

You may want to create a desktop shortcut to the device_cloud directory.