We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

AWS IoT Python SDK v2 Installation



  • Has anyone managed to install the AWS IoT Python SDK v2 on the Omega2?

    I tried to install it from PyPI using python3 -m pip install awsiotsdk but I keep getting the following error:

    Collecting awsiotsdk
      Downloading https://files.pythonhosted.org/packages/55/d1/239722d8cea8e3a1c4a822a7f90e09961e1863a75e64a2227ac96653b16d/awsiotsdk-1.5.6-py3-none-any.whl
    Collecting awscrt==0.10.7 (from awsiotsdk)
      Downloading https://files.pythonhosted.org/packages/8c/33/8d8a4ccce58eaccfac2321c6111226693d84c6b9ef485bcaf42dc1d3bd6f/awscrt-0.10.7.tar.gz (2.8MB)
        54% |█████████████████▍              | 1.5MB 697bytes/s eta 0:31:03Bus error
    

    It seems like it's got something to do with the lack of availability of the precompiled wheels for the Omega.

    AWS recommends installing the following packages if we encounter the precompiled wheels issue mentioned above:

    sudo apt-get update
    sudo apt-get install cmake
    sudo apt-get install libssl-dev
    

    But since the Omega uses opkg package installer instead of apt-get and OpenWRT doesn't support cmake and libssl-dev, I haven't managed to find something that works with the Omega system.

    Is there a way to fix these issues and get the AWS IoT Python SDK to work with my Omega2?



  • I also tried installing the AWS IoT Python SDK v1 using pip3 install AWSIoTPythonSDK but I get the following error:
    8823cfc4-2705-468a-8bbc-3365bfaf91b8-image.png even though I have extended my Omega's memory with a 4GB USB drive.

    Essentially I want to install and run either v1 or v2 of the AWS IoT Python SDK on my Omega2 running the latest firmware. Has anyone managed to do it successfully?


  • administrators

    @jonty said in AWS IoT Python SDK v2 Installation:

    even though I have extended my Omega's memory with a 4GB USB drive.

    There's a nuance here. Did you set it up to boot from external storage or extend the available memory with a swap file?
    You'll want to do the latter.



  • @Lazar-Demin I had extended my Omega's memory by following the Boot from external storage because I ran out of memory when I tried to install python3 and pip packages.

    Will I be able to install those packages if I follow the extend the available memory with a swap file guide?

    Also is it possible to install AWS IoT Python SDK v2 on the Omega2 with this method?


  • administrators

    @jonty again, there's a difference between extending storage and extending memory

    The boot from external storage guide will give you more storage space to work with. This is required if what you're trying to install can't fit on the Omega's internal flash storage.
    Not sure how if this is needed for the AWS IoT Python modules since I don't know how big they are.

    Judging by your screenshot, it looks like pip is running out of memory. Try going through the extend the available memory guide and running the install again.



  • @Lazar-Demin Can I perform both methods on the same USB drive thereby extending both the storage and the memory of the Omega?



  • @jonty if you follow the documentation for each of these points you can see that in order to extend memory you require a swap file, under linux this is a partition type. To boot from an external USB (increase storage) you create an ext4 file system, file systems require a partition.

    So if you understand disk structure, you will understand that in order to create any file system you create a partition, each partition has a type code which describes how the OS will deal with that partition. Be it ext4, FAT, Swap, NTFS, Reiser, ZFS,, JFS, etc etc.

    Therefore logically you can create 2 partions on your USB, 1) Swap partition (memory extension); 2) EXT4 partition (extending storage)

    Of course you can consider putting your swap on an sdcard and your ext4 on a usb key. Consider contention and its impact upon performance.



  • @crispyoz Interesting. I got the Omega2 so I'll have to make do with a single USB drive.



Looks like your connection to Community was lost, please wait while we try to reconnect.