[PyQt] Building PyQt5 on Windows
Wallboy
wallboy at wallboy.ca
Sat Jun 3 03:43:59 BST 2017
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?
My Environment:
Qt 5.8 msvc2015 32 bit version
Python 3.5 32 bit (created a virtualenv for my own build)
PyQt 5.8.2
PyCharm IDE
More information about the PyQt
mailing list