[PyQt] Can't get PyQt5 to work

Colin McPhail colin.mcphail at mac.com
Thu Apr 10 21:24:49 BST 2014

On 2014-04-08, Eddy Ilg <me at eddy-ilg.net> wrote:
> However, I decided to try with Python 3.4. I recompiled everything and 
> now I am getting the following error message:
> Python 3.4.0 (default, Apr  8 2014, 22:02:32)
> [GCC 4.6.3] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Entity
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> ImportError: dynamic module does not define init function (PyInit_Entity)
> >>>
> Checking the symbols of Entity.so gives:
> # nm Entity.so  | grep PyInit_Entity
> 0000000000001e5c t PyInit_Entity
> 0000000000206850 b _ZZ13PyInit_EntityE11sip_methods
> 00000000002062c0 d _ZZ13PyInit_EntityE14sip_module_def
> The function is clearly there! Why can it not be found by python?
I believe that the fact that the type letter in front of PyInit_Entity is 't'
rather than 'T' means that it is only visible within your shared object.  If
that is the case then the Python runtime can't find it.  Maybe PyInit_Entity
is defined as static (or non-global) in your source?

-- CMcP

More information about the PyQt mailing list