Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: srbyers on April 06, 2016, 07:53:02 PM

Title: Python module importing
Post by: srbyers on April 06, 2016, 07:53:02 PM
I'm trying to use openWRT 15.05.1 on the imx233 board. The version of Python 2.7 provided in their distribution is 2.7.9. I'm trying to get 2 c based modules to import (iMX233_GPIO and pyalsaaudio). These compile and load fine with my old arch linux (2.6 I think) and the Python 2.7.3 that it has. When attempting to do so under Python 2.7.9 it shows file not found, if I attempt a second thime, the error is 'ImportError: dynamic module does not define init function'
Does anyone have an idea of how to fix this?
Title: Re: Python module importing
Post by: lambda on April 09, 2016, 07:22:24 PM
Hi,

I don't know much about python, so can't be of real help here.
Did you try to load pyalsaaudio on some other machine with 2.7.9 to check if its a python or an openWRT problem?

In the latter case maybe filing a bug against openWRT is the way to go.

HTH,
Harald
Title: Re: Python module importing
Post by: srbyers on April 11, 2016, 03:42:47 PM
Thanks for the reply, but I don't have any other hardware with 2.7.9 or a version of openwrt with an earlier version of python.
Title: Re: Python module importing
Post by: lambda on April 11, 2016, 05:33:59 PM
Quote from: srbyers on April 11, 2016, 03:42:47 PM
Thanks for the reply, but I don't have any other hardware with 2.7.9 or a version of openwrt with an earlier version of python.

You have any linux workstation or server around? Then you can install 2.7.9 from source there. - That's how I'd go about debugging this.

The other option that comes to my mind is to strace python while it tries to load the module. But I guess making sense of the strace output won't be a trivial task either.

Also there is the hacky approach: Install a chroot with debian on your openwrt system and test 2.7.9 there.

However having a linux box around is a useful thing anyway, so just getting an old PC and installing linux would seem sensible to me.

HTH,
Harald