Installation guide to PyQt4 and PyQt5 on windows 10. Works with Python 3.7.3 32-bit and Python 3.7.3 64-bit (tested)
- Verify that python is installed and runnning by typing
python --version
on the command line. - Verify that you have not installed PyQt before
pip list
. pip install PyQt5
this will install PyQt5.pip install pyqt5-tools
this will install thedesigner.exe
in your Scripts folder.- If you need PyQt4 you will need to download the Windows wheel package. Choose your package according to your Python version. Example, if you are running Python 3.7.3 32-bits you should choose
PyQt4‑4.11.4‑cp37‑cp37m‑win32.whl
. To know your Python version you can type on the command linepython -VV
(Double -V argument gives more info on the vesion). You can also check the thread on StackOverflow. - Run
C:\path\where\wheel\is\> pip install PyQt4‑4.11.4‑cp37‑cp37m‑win32.whl
. The path will probably be the downloads folderC:\Users\<user>\Downloads
. - If you are going to use designer or pyuic from PyQt4 with the command line you will need to add the path to PyQt4 folder to your path and probably move it over the python scripts so it gets read first.
- First you need to search for the location of
designer.exe
in the PyQt4 folder. It should be in theLib\site-packages
folder as in the example belowC:\Users\<user>\AppData\Local\Programs\Python\Python37\Lib\site-packages\PyQt4
- Then you need to add the location to your path
- Finally you will need to move it above the python scripts
- First you need to search for the location of
- Type
designer
on the command line to startdesigner.exe
(Note: if you had a command line open while updating your path, you first need to close it so the changes can take effect). You can verify that the version you are using is PyQt4 by going toHelp > About Qt
on the application bar menu. The first line should beThis program uses Qt version 4.8.7.
or something similar.- If your system is running on high-DPI your QtDesigner could look very small
- To adjust the settings, you can right-click on the QtDesigner icon (you should pin it to the taskbar!) and go to the
Properties
tab - Then, you want to go to the
Compatibility
tab and click onChange high DPI settings
- Tick
Override high DPI scaling behavior
and chooseSystem
from the dropbox. Click onOK
and then onApply
- Finally, you can run again
designer
and while the resolution might be pixelated, you will be able to actually see something without forcing your eyes!
If you have a suggestion, comment or just found this guide useful, please let me know on the comments!