-
Notifications
You must be signed in to change notification settings - Fork 79
Installation
If you are looking for instruction on how to build it go here
To install PyQt5 on your system you will need.
You can either download a zip or clone the repository.
The clone the repository
To clone, ensure you have Git available on your system.
$ git clone https://github.com/pyqt/python-qt5.git
To download zip
- Download archive
- Unpack
- Rename from
python-qt5-master
topython-qt5
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
$ 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_()
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