Skip to content
Marcus Ottosson edited this page Feb 17, 2015 · 14 revisions

You have two options for getting PyQt5 installed on your system.

  1. Install from PyPI
  2. Clone from GitHub



PyPI installation

To install via PyPI, simply run pip.

$ pip install python-qt5



Clone from GitHub

Alternatively, you may choose to clone from GitHub.

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

Initializing Python

Pip install PyQt5 in the site-packages of Python, but since we're cloning it ourselves, we'll need to make this location accessible to Python manually.

  1. In your Python directory - e.g. c:\Python27

  2. Create a qt.conf

  3. With this.

[Paths]
Prefix = c:\github\python-qt5\PyQt5
Binaries = c:\github\python-qt5\PyQt5
  1. Where each path must point to the PyQt5 subdirectory of where you cloned.

  2. Now you can append the repository to your PYTHONPATH

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

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.

Welcome to the wiki for PyQt5 using Python 2.7. For Python 3.4, head here

Table of contents

Developer Resources

Compilation Instructions

Clone this wiki locally