Installation - pyqt/python-qt5 GitHub Wiki

If you are looking for instruction on how to build it go here

To install PyQt5 on your system you will need.

  1. Python

Download

You can either..

A. Clone the repository

To clone, ensure you have Git available on your system.

$ git clone https://github.com/pyqt/python-qt5.git

B. Or download the zip

  1. Download archive
  2. Unpack
  3. Rename from python-qt5-master to python-qt5

Install

Next we need to integrate the installation with your current installation of Python.

$ cd c:\path\to\python-qt5
$ python -c "import util;util.createqtconf()"

Install globally

From here, to use PyQt5 you will need to either append the \python-qt5 directory to your PYTHONPATH or install it globally like this.

$ python setup.py install

Test

$ set PYTHONPATH=c:\github\python-qt5  # Only if you cloned
$ python
>>> import sys
>>> from PyQt5 import QtWidgets
>>> app = QtWidgets.QApplication(sys.argv)
>>> button = QtWidgets.QPushButton("Hello")
>>> button.setFixedSize(400, 400)
>>> button.show()
>>> app.exec_()

Bugs

Python Qt5 is fully encapsulated and requires no further tweaking. If this isn't true for you, that is a bug and you may submit an issue or pull-request with a fix.