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

No module named 'OmegaExpansion'. How do I install this module?



  • I have python 2.7.6 installed, as well as python 3.6.0, and python3-pip 8.1.2-1.

    I have tried running the following in both versions of python:
    from OmegaExpansion import onionI2C. Then I get the error: ImportError: No module named OmegaExpansion

    How do I used python3-pip to install this package? I'm very new to this so I'm not sure where to look for this kind of stuff.



  • @Nathan-Guyette

    It may be you have not configured your feeds correctly. Look at /etc/opkg/distfeeds.conf

    Uncomment each of the lines then run opkg update.

    Then take a look at http://repo.onioniot.com/omega2/packages/packages/

    Some examples of how to install python packages based upon what you see in the above repo:

    opkg install python-pip-conf
    opkg install python-pip



  • @crispyoz , thank you for those suggestions, but that did not work. I'm still getting the same error message, though when running the update, I did notice the following error:

    opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01-SNAPSHOT/packages/mipsel_24kc/onion/Packages.gz, wget returned 8.



  • @Nathan-Guyette Have you ever read the official Onion Omega2 Documentation?

    The default '/etc/opkg/distfeeds.conf' is perfect to install any Onion Omega2 packages.

    opkg update
    opkg install python - to install Python2.7

    # Omega2+ FW v0.3.2 b222
    
    root@Omega-5BE1:/# opkg install python
    Installing python (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python_2.7.15-4_mipsel_24kc.ipk
    Installing python-base (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-base_2.7.15-4_mipsel_24kc.ipk
    Installing libffi (3.2.1-3) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/libffi_3.2.1-3_mipsel_24kc.ipk
    Installing python-light (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-light_2.7.15-4_mipsel_24kc.ipk
    Installing python-ctypes (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-ctypes_2.7.15-4_mipsel_24kc.ipk
    Installing python-pydoc (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-pydoc_2.7.15-4_mipsel_24kc.ipk
    Installing python-multiprocessing (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-multiprocessing_2.7.15-4_mipsel_24kc.ipk
    Installing python-logging (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-logging_2.7.15-4_mipsel_24kc.ipk
    Installing python-codecs (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-codecs_2.7.15-4_mipsel_24kc.ipk
    Installing libsqlite3 (3260000-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/libsqlite3_3260000-4_mipsel_24kc.ipk
    Installing python-sqlite3 (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-sqlite3_2.7.15-4_mipsel_24kc.ipk
    Installing python-xml (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-xml_2.7.15-4_mipsel_24kc.ipk
    Installing libgdbm (1.11-1) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/libgdbm_1.11-1_mipsel_24kc.ipk
    Installing python-gdbm (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-gdbm_2.7.15-4_mipsel_24kc.ipk
    Installing python-email (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-email_2.7.15-4_mipsel_24kc.ipk
    Installing python-distutils (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-distutils_2.7.15-4_mipsel_24kc.ipk
    Installing python-openssl (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-openssl_2.7.15-4_mipsel_24kc.ipk
    Installing python-compiler (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-compiler_2.7.15-4_mipsel_24kc.ipk
    Installing libxml2 (2.9.8-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/libxml2_2.9.8-4_mipsel_24kc.ipk
    Installing libdb47 (4.7.25.4.NC-5) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/libdb47_4.7.25.4.NC-5_mipsel_24kc.ipk
    Installing python-db (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-db_2.7.15-4_mipsel_24kc.ipk
    Installing python-decimal (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-decimal_2.7.15-4_mipsel_24kc.ipk
    Installing python-unittest (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-unittest_2.7.15-4_mipsel_24kc.ipk
    Installing python-ncurses (2.7.15-4) to root...
    Downloading http://repo.onioniot.com/omega2/packages/packages/python-ncurses_2.7.15-4_mipsel_24kc.ipk
    Configuring python-base.
    Configuring libffi.
    Configuring python-light.
    Configuring python-codecs.
    Configuring libxml2.
    Configuring libdb47.
    Configuring python-db.
    Configuring python-decimal.
    Configuring python-distutils.
    Configuring python-pydoc.
    Configuring python-ctypes.
    Configuring python-multiprocessing.
    Configuring python-logging.
    Configuring libsqlite3.
    Configuring python-sqlite3.
    Configuring python-xml.
    Configuring libgdbm.
    Configuring python-gdbm.
    Configuring python-email.
    Configuring python-openssl.
    Configuring python-compiler.
    Configuring python-unittest.
    Configuring python-ncurses.
    Configuring python.
    

    OmegaExpansion is a directory - for example:
    opkg install pyOnionI2C
    This will install the module to /usr/lib/python2.7/OmegaExpansion/

    root@Omega-5BE1:/# opkg install pyOnionI2C
    Installing pyOnionI2C (0.9-1) to root...
    Downloading http://repo.onioniot.com/omega2/packages/onion/pyOnionI2C_0.9-1_mipsel_24kc.ipk
    Installing pyOmegaExpansion (0.9-1) to root...
    Downloading http://repo.onioniot.com/omega2/packages/onion/pyOmegaExpansion_0.9-1_mipsel_24kc.ipk
    Configuring pyOmegaExpansion.
    Configuring pyOnionI2C.
    
    root@Omega-5BE1:/# ls -l /usr/lib/python2.7/OmegaExpansion
    -rw-r--r--    1 root     root             0 Jun 17 20:50 __init__.py
    -rwxr-xr-x    1 root     root          7067 Jun 17 20:50 onionI2C.so
    

    To add the Onion I2C Module to your Python program, include the following in your code:
    from OmegaExpansion import onionI2C

    opkg list | grep -i python is a useful command too.


    #src/gz reboot_onion http://downloads.lede-project.org/releases/17.01-SNAPSHOT/packages/mipsel_24kc/onion
    

    This is a dead repo - comment it out.

    Good luck!



  • @Nathan-Guyette I am having the same problem. Did you ever find a solution?



  • @mawg If you really have the "same problem" (?!) then please read this thread again more carefully.

    • 'OmegaExpansion' is not a Python module - it is a directory.
      /usr/lib/python2.7/OmegaExpansion/
      /usr/lib/python3.6/OmegaExpansion/

    • There's a dead repo in the '/etc/opkg/distfeeds.conf' file of the OpenWrt 17.01 based firmwares - you should not uncomment it.

    #src/gz reboot_onion http://downloads.lede-project.org/releases/17.01-SNAPSHOT/packages/mipsel_24kc/onion```


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