[PyQt] PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices

Phil Thompson phil at riverbankcomputing.com
Thu Aug 9 14:32:19 BST 2018


On 9 Aug 2018, at 9:19 am, Florian Bruhin <me at the-compiler.org> wrote:
> 
> Hey,
> 
> On Thu, Aug 09, 2018 at 08:03:36AM +0000, Blanc Nicolas wrote:
>> I encountered the following error when using PyQt5 with Python 3.5 on Ubuntu 16.04 (4.15.0-29-generic x86_64 GNU/Linux)
>> My PyQt5 version is : 5.11.2
>> And PyQt5_sip : 4.19.12
>> Both installed using pip3.
>> 
>> Here is the error :
>> 
>> 
>> $ python3
>> Python 3.5.2 (default, Nov 23 2017, 16:37:01)
>> [GCC 5.4.0 20160609] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import PyQt5
>>>>> from PyQt5 import QtCore
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>> ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices
> 
> It's a Python bug which was fixed in 3.5.4. Unfortunately, Ubuntu
> prefers keeping older buggy versions ;-)

To be honest it's a PyQt bug that wasn't picked up because it only affected earlier versions of Python.

The lesson is to only test with the x.y.0 versions.

Phil


More information about the PyQt mailing list