Home Assistant Installation: Out of Memory | Dependencies failing

  • Hi again

    This may be a question more appropiate for the Home Assistant forum, but they´re not answering me so far :(

    I´m trying to install Home Assistant into my Omega2+. I managed to use a 2GB SD card as external storage, since the packages are too big to fit the chip memory.

    First, I switched to the LEDE repos and installed python3, python3-dev and pip3 without problems. Then I had to upgrade setuptools manually before installing the homessistant package to avoid errors. So far, everything looks OK.

    By the way, I didn´t use virtualenv as the HA documentation recommends because I couldn´t find a way to create another user (no useradd or something similar?). So I run the service as root.

    The problem starts when I run th service for the first time. Home Assistant uses pip3 to install even more dependencies and I get an error when it tries to install SQLAlchemy 1.1.5.

    INFO:homeassistant.util.package:Attempting install of sqlalchemy==1.1.5
        Error [Errno 12] Out of memory while executing command python setup.py egg_info
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
        status = self.run(options, args)
      File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 324, in run
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 634, in _prepare_file
      File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
      File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 439, in run_egg_info
        command_desc='python setup.py egg_info')
      File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 667, in call_subprocess
        cwd=cwd, env=env)
      File "/usr/lib/python3.6/subprocess.py", line 707, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.6/subprocess.py", line 1260, in _execute_child
        restore_signals, start_new_session, preexec_fn)
    OSError: [Errno 12] Out of memory

    This renders the recorder module offline.

    I stopped the service and tried to install SQLAlchemy manually:

    root@Omega-B195:~# pip3 install SQLAlchemy
    Collecting SQLAlchemy
      Downloading SQLAlchemy-1.1.5.tar.gz (5.1MB)
        100% |████████████████████████████████| 5.1MB 9.0kB/s
    Installing collected packages: SQLAlchemy
      Running setup.py install for SQLAlchemy ... error
    Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lmkqasx1/SQLAlchemy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6nvt9mfw-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lmkqasx1/SQLAlchemy/

    It seems it fails attempting to install record, so...

    root@Omega-B195:~# pip3 install record
    Collecting record
      Downloading Record-3.1.zip
    Collecting ExtensionClass>=4.1a1 (from record)
      Downloading ExtensionClass-4.2.1.tar.gz
    Installing collected packages: ExtensionClass, record
      Running setup.py install for ExtensionClass ... error
    Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9qbls4a3/ExtensionClass/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-zdngfx4u-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9qbls4a3/ExtensionClass/

    Then I gave it a try to ExtensionClass:

    root@Omega-B195:~# pip3 install ExtensionClass
    Collecting ExtensionClass
      Using cached ExtensionClass-4.2.1.tar.gz
    Installing collected packages: ExtensionClass
      Running setup.py install for ExtensionClass ... error
    Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0jagd4t0/ExtensionClass/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-0grsl2rc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0jagd4t0/ExtensionClass/

    I´m puzzled. I thought I could avoid the out of memory by installing the dependencies in advance but I got a totally different error. Is it possible that these modules can´t be installed because I don´t have a c compiler installed? I have more experience with Java than Python.

    If I create a swap file and run hass I get an Out of Disk Space error instead of an Out of Memory. Any other ideas to try?

    Thanks in advance.

Log in to reply

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