[PyQt] Building PyQt5 on Windows

Phil Thompson phil at riverbankcomputing.com
Sat Jun 3 10:26:46 BST 2017

On 03/06/2017 03:43, Wallboy wrote:
> I have been using the "pip install PyQt5" version in my my main Python
> sites-package. I'm interested in building some custom builds of PyQt
> to test in a virtualenv. So I first decided to just figure out how to
> get a working vanilla build before trying to customize my own build. I
> followed  the instructions here:
> http://pyqt.sourceforge.net/Docs/PyQt5/installation.html and also here
> for Windows: https://stackoverflow.com/a/40779370
> I expected to get the same structure in my site-packages folder for my
> "pip install PyQt5" version, however after the build I don't have the
> "Qt" folder with all the bin/plugins/etc folders containing the dlls.
> However, I do see the dll files were created in my build folder under
> each of the "release" folders. Also I don't see any generation of the
> executables for pyuic or pyrcc or QtWebEngineProcess.exe.
> I'm using PyCharm for my IDE and I have created a project pointing to
> that virtualenv (and confirmed it was the directory used in the
> configure.py output). But when I try to import any PyQt5 modules it
> tells me it can't find the module in the __init__.py file. The
> __init__.py version that got built for me is just all comments.
> However the one that comes with the pip install PyQt5 has:
> import os as _os
> _path = _os.path.dirname(__file__) + '\\Qt\\bin;' + _os.environ['PATH']
> _os.environ['PATH'] = _path
> I'm confused why my built version differs so much from the version you
> get installed from pip install PyQt5? Is there another step I'm
> missing?

Yes. Commercial users are provided a tool to build a full wheel.

A wheel is just a zip file so you can take it apart and change its 
contents as you wish.


More information about the PyQt mailing list