Is it possible to require PyQt from setuptools setup.py?

While you can pip install pyqt5 thanks to the now available wheels (as suggested by @mfitzp), it cannot be required from setup.py via install_requires. The reason is that setuptools doesn't know how to install wheels which pip knows how to, and PyQT5 is only available as wheels on PyPI (there is no source distribution, i.e. no tar.gz file). See this email and that bug report for details.


Right, the PyQT packages are not using distutils / setup.py for it's installation, so they can't be installed with easy_install or pip. You need to download and install it manually.

That also means you should not put it in your requires metadata, as easy_install and pip then will try to install it and fail.

I don't know if PySide is any good, but is also has not setup.py, and also refuse to install with easy_install/pip, so not a good option. :)

Another option is to repackage PyQt with distutils, but that may be a lot of work.