Developer Support Iotic Labs

Install Python and the py-IoticAgent

 

Before programming an Iotic system, you will need to download Python3 and the IoticAgent API.

  1. Download Python3 and the Python3 installer (Pip)

Python logo 

Ubuntu:

  1. Open a terminal
  2. Run sudo apt install python3 python3-pip

 

Mac:

  1. Install Brew from http://brew.sh/
  2. Open a terminal
  3. Run brew install python3

 

Windows:

  1. Follow the instructions at https://docs.python.org/3/using/windows.html to download Python3 and Pip3
  2. Tick Add python 3.x to path to be able to run Python or Pip from any command prompt

 

Note. If you prefer to use Python2, you will need to make your Iotic code compatible by adding the following at the top of your scripts:

 

# PYTHON2 COMPATIBILITY ——————————————–from __future__ import unicode_literals, print_function  # pylint: disable=unused-import

 

 

  1. Install the Iotic Agent (py-IoticAgent)

Iotic logo

 

The Iotic Agent is a library of code that provides access to Iotic Space by communicating with the secure Iotic brokering service.

 

You can find more information about py-IoticAgent from these places:

 

 

You can install the Iotic Agent globally by running the following in a terminal:

 

Ubuntu and Mac:    pip3 install py-IoticAgent

Windows:                pip install py-IoticAgent

 

Alternatively, you can install it to a specific directory:

 

  1. Create the local directory
  2. Open a terminal

 

 

Ubuntu and Mac:    pip3 install -t 3rd py-IoticAgent

Windows:                pip install -t 3rd py-IoticAgent

 

If you’ve installed the Iotic Agent to a specific directory, each time you open a terminal to run your Iotic system you will first need to set the Pythonpath by running:

 

export PYTHONPATH=./3rd:./src

By continuing to use the site, you agree to the use of cookies. more information

This website uses cookies via Google Analytics to give you the best browsing experience possible. No personally-identifiable information is collected about you unless you explicitly submit that information on this website. Click "Accept" to continue.

Close