[PySide] python setup.py build fails with error: ‘class Shiboken::GilState’ has no member named ‘abandon’

Filippo Rusconi listes.rusconi at laposte.net
Tue Sep 8 15:51:17 CEST 2020

Greetings, Fellow Developers,

new to this list, and new to the PySide2 world, I hope I am not erring by
sending this mail.

I am willing to explore the Qt for Python universe, and for that I am following
the instructions located at 


I could perform all the steps up to the build of PySide2, with the following
command line:

python setup.py build --qmake=/usr/lib/qt5/bin/qmake --build-tests --ignore-git

The build configures fine and then the build stops with the following error:

[ 16%] Building CXX object PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/qthread_wrapper.cpp.o
/home/rusconi/.virtualenvs/pyside2/pyside-setup/pyside23_build/py3.8-qt5.14.2-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qthread_wrapper.cpp: In function ‘void qthread_pthread_cleanup(void*)’:
/home/rusconi/.virtualenvs/pyside2/pyside-setup/pyside23_build/py3.8-qt5.14.2-64bit-release/pyside2/PySide2/QtCore/PySide2/QtCore/qthread_wrapper.cpp:122:10: error: ‘class Shiboken::GilState’ has no member named ‘abandon’
   122 |     gil->abandon();
       |          ^~~~~~~
make[2]: *** [PySide2/QtCore/CMakeFiles/QtCore.dir/build.make:1870: PySide2/QtCore/CMakeFiles/QtCore.dir/PySide2/QtCore/qthread_wrapper.cpp.o] Error 1
make[2]: Leaving directory '/home/rusconi/.virtualenvs/pyside2/pyside-setup/pyside23_build/py3.8-qt5.14.2-64bit-release/pyside2'
make[1]: *** [CMakeFiles/Makefile2:1414: PySide2/QtCore/CMakeFiles/QtCore.dir/all] Error 2
make[1]: Leaving directory '/home/rusconi/.virtualenvs/pyside2/pyside-setup/pyside23_build/py3.8-qt5.14.2-64bit-release/pyside2'
make: *** [Makefile:141: all] Error 2
error: Error compiling pyside2
Traceback (most recent call last):
   File "setup.py", line 296, in <module>
   File "/home/rusconi/.virtualenvs/pyside2/pyside-setup/build_scripts/setup_runner.py", line 158, in run_setup
     raise RuntimeError(msg)
setup.py invocation failed with exit code: 1.

I do not yet know what GIL is. All I can say is that I had 

git clone --recursive https://code.qt.io/pyside/pyside-setup
cd pyside-setup
git checkout 5.14

I checked out 5.14 because that is the version I have in my Debian box: 

$ dpkg -l "qtbase5*"
||/ Name                      Version       Architecture Description
ii  qtbase5-dev:amd64         5.14.2+dfsg-6 amd64        Qt 5 base development files

Any good soul would explain that error to me and hopefully allow me go forward ?

Most sincerely,


⢀⣴⠾⠻⢶⣦⠀  Filippo Rusconi, PhD
⣾⠁⢠⠒⠀⣿⡁   Research scientist at CNRS
⢿⡄⠘⠷⠚⠋⠀   Debian Developer
⠈⠳⣄⠀⠀⠀⠀  http://msxpertsuite.org

More information about the PySide mailing list