[PyQt] Next Releases

Phil Thompson phil at riverbankcomputing.com
Mon Sep 8 18:01:45 BST 2014


On 08/09/2014 5:32 pm, Georg Brandl wrote:
> On 09/08/2014 01:49 PM, Dmitry Shachnev wrote:
> 
>> I have just figured this out myself and got the same error message:
>> 
>> ImportError: 
>> /usr/lib/python3/dist-packages/sip.cpython-34m-i386-linux-gnu.so:
>> undefined symbol: PyProperty_Type
>> 
>> The stack trace when that error is printed is:
> 
> [...]
>> where line 141 of pluginloader.cpp is:
>> 
>> 141                sip_unwrapinstance = getModuleAttr("sip", 
>> "unwrapinstance");
>> 
>> Hope that helps,
> 
> Hi Dmitry,
> 
> thanks for the investigation.  This prompted me to look into it a bit 
> more, I
> made a diff between 4.10.4 and 4.11.1.
> 
> The hunk below appears to be the related to the problem, although I of 
> course
> can't say why the change was made and if it could be reverted.
> 
> cheers,
> Georg
> 
> diff -u PyQt-x11-gpl-4.10.4/designer/pluginloader.cpp
> PyQt-x11-gpl-4.11.1/designer/pluginloader.cpp
> --- PyQt-x11-gpl-4.10.4/designer/pluginloader.cpp  2014-03-14 
> 15:19:06.000000000
> +0100
> +++ PyQt-x11-gpl-4.11.1/designer/pluginloader.cpp  2014-07-03 
> 16:00:24.000000000
> +0200
> @@ -131,17 +129,7 @@
> 
>          // Make sure the interpreter is loaded and initialised.  Leave 
> this as
>          // late as possible.
> -        if (!Py_IsInitialized())
> -        {
> -            QLibrary library(PYTHON_LIB);
> -
> -            library.setLoadHints(QLibrary::ExportExternalSymbolsHint);
> -
> -            if (!library.load())
> -                return;
> -
> -            Py_Initialize();
> -        }
> +        Py_Initialize();
> 
>          // Make sure we have sys.path.
>          if (!sys_path)

The reason why that code was removed was because I couldn't see how it 
was having any affect - if Py_Initialized() could be called then the 
library must already be loaded. However if it fixes your problem then 
I'll revert it. The value of PYTHON_LIB should be 
"/path/to/libpython2.7".

Phil


More information about the PyQt mailing list