Python – PySide 2 installs successfully, but Shiboken 2 is not installed

PySide 2 installs successfully, but Shiboken 2 is not installed… here is a solution to the problem.

PySide 2 installs successfully, but Shiboken 2 is not installed

I’ve successfully built and installed PySide 2 on Python 3.6.4 (default, not Anaconda) and Windows 10 operating systems

But shiboken2 is not installed yet. How do I install shiboken2? I know the code for this module is attached to the PySide2 installation file.

I

suspect that the C++ code I built as a DLL file cannot be imported in Python due to the lack of shiboken2. However, this import works well in the Anaconda environment. But at the moment I don’t want to use Anaconda because there is an older version of “Qt” (5.6 but I need 5.9.x) and “PySide2” installed.

Solution

Just now I found out that shiboken2 can be imported like this:

    from PySide2 import shiboken2

So before importing my own file, the above line must be added.

Related Problems and Solutions