Install Python packages

The IX15 device includes support to install Python wheel packages or zip packages coming from the PyCharm IDE. See Develop Python applications for details on how to develop Python applications.

When installing a zip package, the contents are uncompressed in the /etc/config/scripts directory and the requirements are automatically installed.

To install a wheel or zip—see Develop an application in PyCharm—follow these steps:

  1. Upload your package to a directory in your device. See Upload and download files.

  2. Access the command line application and run pyinstall package <path_to_your_package>.

Example: pyinstall package

> pyinstall package /tmp/AWS-basicPubSub.zip
Archive:  /tmp/AWS-basicPubSub.zip
inflating: AWS-basicPubSub/main.py
inflating: AWS-basicPubSub/requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting AWSIoTPythonSDK>=1.4.9
|████████████████████████████████| 80 kB 2.0 MB/s
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for AWSIoTPythonSDK, since package 'wheel' is not installed.
Installing collected packages: AWSIoTPythonSDK
Running setup.py install for AWSIoTPythonSDK ... done
Successfully installed AWSIoTPythonSDK-1.4.9
>save configuration
cfg.commit()

File and requirements are installed in /etc/config/scripts directory.

> ls /etc/config/scripts/AWS-basicPubSub/
-rw-r-----    1 root     root          5091 Nov  2 06:45 main.py
-rw-r-----    1 root     root           103 Nov  2 06:45 requirements.txt
>
  1. Optionally, you can configure your IX15 device to automatically run the installed application.

See Set up the IX15 to automatically run your applications for more details.