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

Cannot install aioserial package using pip



  • Hello,

    I'm trying to install python's module aioserial (https://pypi.org/project/aioserial/) and I'm getting the following error:

    07e3a0fa-6f64-47d2-ba4c-c8564ae60c2a-image.png

    This is not the first time pip has failed to install a package on the omega. This happens often and depending on the situation I usually switch between using opkg and pip to install python modules, but this time I don't have aioserial available in the openwrt package feed that has python packages to download.

    I tried this on an omega running openwrt 18.06 and another one running openwrt 22.03 I even used a freshly flashed one running 18.06. I got the same results in all of my attempts. I would really appreciate some help,

    Thanks!


  • administrators

    @SUPERMARINE98 My hunch is that one of aioserial's dependencies needs to be compiled. Since your Omega doesn't have the compiler installed the whole package installation fails.

    Is there a way to get pip to be more verbose with the error message? That way we'll know what we're dealing with.



  • Hi Lazar,

    This are the full logs that I get after running pip3 install --verbose --verbose aioserial 2>&1 | tee installation.log:

    Using pip 23.2.1 from /usr/lib/python3.10/site-packages/pip (python 3.10)
    Non-user install because site-packages writeable
    Created temporary directory: /tmp/pip-build-tracker-zt7wtic2
    Initialized build tracking at /tmp/pip-build-tracker-zt7wtic2
    Created build tracker: /tmp/pip-build-tracker-zt7wtic2
    Entered build tracker: /tmp/pip-build-tracker-zt7wtic2
    Created temporary directory: /tmp/pip-install-el_o6lah
    Created temporary directory: /tmp/pip-ephem-wheel-cache-4a8i8g_e
    1 location(s) to search for versions of aioserial:
    * https://pypi.org/simple/aioserial/
    Fetching project page and analyzing links: https://pypi.org/simple/aioserial/
    Getting page https://pypi.org/simple/aioserial/
    Found index url https://pypi.org/simple/
    Looking up "https://pypi.org/simple/aioserial/" in the cache
    Request header has "max_age" as 0, cache bypassed
    Starting new HTTPS connection (1): pypi.org:443
    https://pypi.org:443 "GET /simple/aioserial/ HTTP/1.1" 200 1938
    Updating cache with response from "https://pypi.org/simple/aioserial/"
    etag object cached for 1209600 seconds
    Caching due to etag
    Fetched page https://pypi.org/simple/aioserial/ as application/vnd.pypi.simple.v1+json
      Found link https://files.pythonhosted.org/packages/ba/35/0990e159396a67b1da5f851ca7f542514a894429c30b2a848e4dff86c412/aioserial-1.0.10.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.7), version: 1.0.10
      Found link https://files.pythonhosted.org/packages/df/6f/7e91993bab5763c7ad07bdd0fc76e64a7a152dfa0fc26edb5397f20168ae/aioserial-1.1.0.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6), version: 1.1.0
      Found link https://files.pythonhosted.org/packages/42/21/c4d100fb803645fd670e9ddf6a13162adc92a66f38d562e15c2f3cd053fb/aioserial-1.1.1.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6), version: 1.1.1
      Found link https://files.pythonhosted.org/packages/43/bb/8cd2217e0d105638ed83b796b2f5d279341f7a789d1af366a3c335f6f81a/aioserial-1.1.2.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6), version: 1.1.2
      Found link https://files.pythonhosted.org/packages/97/55/40dcb75c1edc827e0ce9c7238862c8b9822ee6679247e7a45bfabe34b6fa/aioserial-1.1.3.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6), version: 1.1.3
      Found link https://files.pythonhosted.org/packages/94/6e/f5d8cd97d4dc19fa0e563f7ca443c8ab223d21475d8ce2b9ef43b123d342/aioserial-1.1.4.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6), version: 1.1.4
      Found link https://files.pythonhosted.org/packages/25/ea/faa63b8f0516e70b00c03e0fbe5a7af1858b3698908de9d251d727471e83/aioserial-1.2.1-py3-none-any.whl (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.2.1
      Found link https://files.pythonhosted.org/packages/d3/5b/0ad283e7c61401c86c4c02568eea9a747c7518d1153057e5339cd200bd1d/aioserial-1.2.1.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.2.1
      Found link https://files.pythonhosted.org/packages/45/61/4c3ba236f42b1d57adc1bf90ea8c97f203648c84db7a890aec7b4e6ca634/aioserial-1.2.2-py3-none-any.whl (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.2.2
      Found link https://files.pythonhosted.org/packages/5f/0c/4681726772b05118dfa939f46c2bc527df5701c6b98932964f36ceb687af/aioserial-1.2.2.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.2.2
      Found link https://files.pythonhosted.org/packages/74/e6/6a8685407cd7b2f97b8d995fe56d50dd0ef8be1b492e16aa6a8cea848e3e/aioserial-1.2.3-py3-none-any.whl (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.2.3
      Found link https://files.pythonhosted.org/packages/e4/dc/9bd5a9d3baf7dd7334dc66625deae5e7f9a53826e7d9042152629e86847c/aioserial-1.2.3.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.2.3
      Found link https://files.pythonhosted.org/packages/9a/4b/dc5b6a0a5bcd3f92f509b8d90a4aada83bd37e67978cb6f5546a2b9ea7e1/aioserial-1.3.0-py3-none-any.whl (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.3.0
      Found link https://files.pythonhosted.org/packages/9b/db/54ec487184e5d0d5c257ccf9de20b0f446e14cc5a99b27698ea5b8138ece/aioserial-1.3.0.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.3.0
      Found link https://files.pythonhosted.org/packages/c1/0c/7aa5e4fdfc8353a06374ae768d9bd8f3d8109c5f1d6829906ba16fdd1a2d/aioserial-1.3.1.tar.gz (from https://pypi.org/simple/aioserial/) (requires-python:>=3.6,<4.0), version: 1.3.1
    Skipping link: not a file: https://pypi.org/simple/aioserial/
    Given no hashes to check 15 links for project 'aioserial': discarding no candidates
    Collecting aioserial
      Created temporary directory: /tmp/pip-unpack-3sv60b98
      Looking up "https://files.pythonhosted.org/packages/c1/0c/7aa5e4fdfc8353a06374ae768d9bd8f3d8109c5f1d6829906ba16fdd1a2d/aioserial-1.3.1.tar.gz" in the cache
      No cache entry available
      Starting new HTTPS connection (1): files.pythonhosted.org:443
      https://files.pythonhosted.org:443 "GET /packages/c1/0c/7aa5e4fdfc8353a06374ae768d9bd8f3d8109c5f1d6829906ba16fdd1a2d/aioserial-1.3.1.tar.gz HTTP/1.1" 200 9608
      Downloading aioserial-1.3.1.tar.gz (9.6 kB)
      Ignoring unknown cache-control directive: immutable
      Updating cache with response from "https://files.pythonhosted.org/packages/c1/0c/7aa5e4fdfc8353a06374ae768d9bd8f3d8109c5f1d6829906ba16fdd1a2d/aioserial-1.3.1.tar.gz"
      etag object cached for 1209600 seconds
      Caching due to etag
      Added aioserial from https://files.pythonhosted.org/packages/c1/0c/7aa5e4fdfc8353a06374ae768d9bd8f3d8109c5f1d6829906ba16fdd1a2d/aioserial-1.3.1.tar.gz to build tracker '/tmp/pip-build-tracker-zt7wtic2'
      Created temporary directory: /tmp/pip-build-env-bxgkr8ab
      Installing build dependencies: started
      Running command pip subprocess to install build dependencies
      Using pip 23.2.1 from /usr/lib/python3.10/site-packages/pip (python 3.10)
      Collecting poetry>=0.12
        Obtaining dependency information for poetry>=0.12 from https://files.pythonhosted.org/packages/7d/25/f3bfda3c458d114005af99441d009936b85a34a730aeb9cf57fb2630d9f7/poetry-1.6.1-py3-none-any.whl.metadata
        Downloading poetry-1.6.1-py3-none-any.whl.metadata (6.8 kB)
      Collecting build<0.11.0,>=0.10.0 (from poetry>=0.12)
        Downloading build-0.10.0-py3-none-any.whl (17 kB)
      Collecting cachecontrol[filecache]<0.14.0,>=0.13.0 (from poetry>=0.12)
        Obtaining dependency information for cachecontrol[filecache]<0.14.0,>=0.13.0 from https://files.pythonhosted.org/packages/1d/e3/a22348e6226dcd585d5a4b5f0175b3a16dabfd3912cbeb02f321d00e56c7/cachecontrol-0.13.1-py3-none-any.whl.metadata
        Downloading cachecontrol-0.13.1-py3-none-any.whl.metadata (3.0 kB)
        Link requires a different Python (3.10.12 not in: '>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0'): https://files.pythonhosted.org/packages/3d/53/4eaeead9a3564955a66ad25d99ddac161e9abc67646384019255afd2e0ce/cleo-0.6.2-py2.py3-none-any.whl (from https://pypi.org/simple/cleo/) (requires-python:>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0)
        Link requires a different Python (3.10.12 not in: '>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0'): https://files.pythonhosted.org/packages/57/af/a17f5e4184a872e8916d0fd84d77513c74cd055585c1936181d9f9a8c69e/cleo-0.6.2.tar.gz (from https://pypi.org/simple/cleo/) (requires-python:>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0)
        Link requires a different Python (3.10.12 not in: '>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0'): https://files.pythonhosted.org/packages/f6/be/f92c1221bd2acd9bb170d8097ce62ea2905e3bd8a0061ecbe76db99d8e8d/cleo-0.6.3-py2.py3-none-any.whl (from https://pypi.org/simple/cleo/) (requires-python:>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0)
        Link requires a different Python (3.10.12 not in: '>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0'): https://files.pythonhosted.org/packages/69/49/f23c30b41eee47d3f9032c427f18616a8ff83c64d7210cad5ab5ff9ef8b4/cleo-0.6.3.tar.gz (from https://pypi.org/simple/cleo/) (requires-python:>=2.7.0.0,<2.8.0.0,>=3.4.0.0,<4.0.0.0)
      Collecting cleo<3.0.0,>=2.0.0 (from poetry>=0.12)
        Downloading cleo-2.0.1-py3-none-any.whl (77 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.3/77.3 kB 95.5 kB/s eta 0:00:00
      Collecting crashtest<0.5.0,>=0.4.1 (from poetry>=0.12)
        Downloading crashtest-0.4.1-py3-none-any.whl (7.6 kB)
      Collecting dulwich<0.22.0,>=0.21.2 (from poetry>=0.12)
        Downloading dulwich-0.21.6.tar.gz (445 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 445.5/445.5 kB 123.7 kB/s eta 0:00:00
        Installing build dependencies: started
        Running command pip subprocess to install build dependencies
        Using pip 23.2.1 from /usr/lib/python3.10/site-packages/pip (python 3.10)
        Collecting setuptools>=61.2
          Obtaining dependency information for setuptools>=61.2 from https://files.pythonhosted.org/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl.metadata
          Downloading setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
        Downloading setuptools-68.2.2-py3-none-any.whl (807 kB)
    

    I left it running for about 20 minutes but it seems like execution freezes at the last log.


  • administrators

    @SUPERMARINE98 thanks for the detailed logs. We still haven't ruled out if there's some compilation required.

    Our next step should be to determine what's going on with the setuptools installation. Did the Omega2 maybe run out of space? You can check by running df -h

    Here's sample output:
    a98d9a4c-4aa2-4052-8826-bf3d330f854f-image.png

    If the /dev/mtdblock6 partition is full or close to full that's the issue. You'll need to boot from external storage to have more storage space.

    If not, then there's something wonky with pip's installation of setuptools. For both the Onion v0.3.4 firmware and openwrt 22.03, there's a python3-setuptools package that can be installed with opkg.
    Try opkg update; opkg install python3-setuptools and then running your pip command again.



  • @Lazar-Demin I already had the omega setup to boot from external storage when I attempted to install aioserial

    5ec2ba98-7027-481f-b8d7-6c5958bc488b-image.png

    Also, when I tried to install python3-setuptools package, it appears that is already installed

    9d0d183c-e861-42ea-b7d9-79975a57ae91-image.png


  • administrators

    @SUPERMARINE98 but then this line from your pip command output Downloading setuptools-68.2.2-py3-none-any.whl indicates it's trying to install a newer version of setuptools.

    Maybe pip just runs out of memory? Try making a swap file to extend the Omega's available memory: http://docs.onion.io/omega2-docs/extending-omega-memory.html

    And then trying to use pip to install only setuptools



  • @Lazar-Demin I was able to successfully create a swap file. This approach really did something as the installation went on even further, although, it failed later on. This are the complete logs with double --verbose flags (Had to upload to google drive due to length and file extension restrictions with the forum post editor)

    I can clearly see that I get OSError: [Errno 28] No space left on device which seems weird as I have plenty of memory left in the overlay storage:

    root@Omega-8dac:/# df -h
    Filesystem                Size      Used Available Use% Mounted on
    /dev/root                 4.5M      4.5M         0 100% /rom
    tmpfs                    59.8M     20.9M     38.8M  35% /tmp
    /dev/mmcblk0p2           25.8G    147.9M     24.4G   1% /overlay
    overlayfs:/overlay       25.8G    147.9M     24.4G   1% /
    tmpfs                   512.0K         0    512.0K   0% /dev
    /dev/mmcblk0p1            3.0G    896.7M      2.1G  29% /mnt/mmcblk0p1
    /dev/mtdblock6           25.1M    748.0K     24.3M   3% /mnt/mtdblock6
    /dev/sda1                14.4G    256.0M     14.2G   2% /mnt/sda1
    root@Omega-8dac:/#
    


  • @SUPERMARINE98 I think it is running out of space in the /tmp directory. Try setting the environent variable to point to where you have the most space before you rur pip

    TMPDIR=/mnt/sda1/tmp
    pip .....



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