PySide2 installation instructions should mention to also install Qt?

Hi,

The book (appendix A) states to install PySide2 using pip3 (Windows and macOS) or apt-get (Linux).

Supposedly, running pip3 install pyside2 only install the bindings to the library, does it not? Shouldn’t we also install Qt itself by downloading the installer from the Qt website? Or am I misunderstanding?

Using a package manager such as Homebrew (macOS) or apt-get (Linux) supposedly takes care of this dependency, although see my other post about the apt-get command sadly not being functional.

Hi @nael

You don’t actually need a separate installation of Qt. When you install PyQt5/PySide2 the binary libraries are installed alongside the Python code. See below for example of PySide2 install folder on Windows, the .dll files are the Qt5 libraries.

 Directory of C:\Users\Gebruiker\AppData\Local\Programs\Python\Python37\Lib\site-packages\PySide2

28/01/2020  13:51    <DIR>          .
28/01/2020  13:51    <DIR>          ..
28/01/2020  13:51         4,173,928 d3dcompiler_47.dll
28/01/2020  13:51           589,432 designer.exe
28/01/2020  13:51    <DIR>          examples
28/01/2020  13:51    <DIR>          glue
28/01/2020  13:51    <DIR>          include
28/01/2020  13:51           207,992 lconvert.exe
28/01/2020  13:51            23,672 libEGL.dll
28/01/2020  13:51         3,573,880 libGLESv2.dll
28/01/2020  13:51         1,326,200 linguist.exe
28/01/2020  13:51           219,256 lrelease.exe
28/01/2020  13:51           567,416 lupdate.exe
28/01/2020  13:51        20,923,392 opengl32sw.dll
28/01/2020  13:51    <DIR>          plugins
28/01/2020  13:51           134,144 pyside2-lupdate.exe
28/01/2020  13:51           144,896 pyside2.abi3.dll
28/01/2020  13:51            44,812 pyside2.abi3.lib
28/01/2020  13:51    <DIR>          qml
28/01/2020  13:51                21 qt.conf
28/01/2020  13:51           235,008 Qt3DAnimation.pyd
28/01/2020  13:51            18,524 Qt3DAnimation.pyi
28/01/2020  13:51           261,120 Qt3DCore.pyd
28/01/2020  13:51            22,114 Qt3DCore.pyi
28/01/2020  13:51           465,408 Qt3DExtras.pyd
28/01/2020  13:51            34,759 Qt3DExtras.pyi
28/01/2020  13:51           225,792 Qt3DInput.pyd
28/01/2020  13:51            17,554 Qt3DInput.pyi
28/01/2020  13:51            52,224 Qt3DLogic.pyd
28/01/2020  13:51             2,867 Qt3DLogic.pyi
28/01/2020  13:51         1,107,456 Qt3DRender.pyd
28/01/2020  13:51           152,136 Qt3DRender.pyi
28/01/2020  13:51           419,960 Qt53DAnimation.dll
28/01/2020  13:51           383,608 Qt53DCore.dll
28/01/2020  13:51           628,344 Qt53DExtras.dll
28/01/2020  13:51           375,416 Qt53DInput.dll
28/01/2020  13:51            50,808 Qt53DLogic.dll
28/01/2020  13:51           172,664 Qt53DQuick.dll
28/01/2020  13:51            54,904 Qt53DQuickAnimation.dll
28/01/2020  13:51            76,408 Qt53DQuickExtras.dll
28/01/2020  13:51            51,832 Qt53DQuickInput.dll
<snip>

You can install a separate installation of Qt if you want access to the tools (Qt Designer, Qt Creator, etc.) But this installation won’t affect your Python versions.

Hi @martin, thanks a lot!

I had no idea, and went to all the trouble of installing Qt itself prior to installing PySide2.

I installed PySide2 via pip in a virtual environment on Windows and I can confirm that I’ve got a lot of Qt5*.dll files in /path/to/my/venv/Lib/site-packages/PySide2. I’ll know it for next time. Thanks again!