[PyQt] pyqtdeploy, Android and extensions

Robert Kent rob at gulon.co.uk
Fri Apr 8 18:08:20 BST 2016


Hi Phil,

So, I've gone back and used python-for-android (i.e. kivy) to build 
numpy and I still get the same error, so it seems that its either the 
way python is built or the way in which it imports modules that is 
different. I'm still confused by the fact that exception message is that 
it doesn't know how to import a module built as a C extension... this 
makes me think that I have to do something with python rather than numpy...

Any thoughts any one?

Cheers, Rob

On 08/04/2016 13:28, Phil Thompson wrote:
> On 8 Apr 2016, at 1:07 pm, Robert Kent <rob at gulon.co.uk> wrote:
>> Hi Phil,
>>
>> I'm happy to say that I have successfully got a PyQt app up and running on Android (in the simulator anyway!). I'm now on to the fun part of trying to dynamically load extension modules. The prescribed technique works up to a point, i.e. placing the shared object (.so) file next to the executable (in Android's case the generated lib<APP_NAME>.so). However, when the app tries to import the module I get the following:
>>
>> ImportError:
>>   Don't know how to import numpy.core.multiarray (type code 3)
>>
>> I have cross-compiled the module and checked its compiled for the correct architecture. As far as I understand it, type code 3 is for C extensions...
>>
>> Any suggestions on what I might be missing or alternative methods would be hugely appreciated.
> I might be worth looking at what kivy does with numpy.
>
> Phil



More information about the PyQt mailing list