[PyQt] PyQt5 for Python 2.7 on Windows 10
Phil Thompson
phil at riverbankcomputing.com
Wed May 31 18:55:25 BST 2017
On 31 May 2017, at 6:40 pm, Nathan Warmerdam <nbwarmerdam at integrated-informatics.com> wrote:
>
> Hi Phil,
>
> We have a commercial license of Qt. On our build machine (windows 8.1 with VS 2015) I did the following:
> - Installed Qt 5.8 (msvc2015)
> - pulled down the PyQT5 5.8.2 Commercial source code
> - sip 4.19.2. source code
>
> I then successfully built sip and PyQt5 for python 2.7. In an effort to make my build of PyQt5 independent of a Qt install I did the following:
> - Copy the relevant qt dlls to a sub folder PyQt5/Qt/bin
> - Copy the relevant qt plugins and qml files to PyQt5/Qt/plugins and PyQt5/Qt/qml respectively
> - Copy the windows redistributables (concrt140.dll, msvcp140.dll, vccorlib140.dll, vcruntime140.dll) to PyQt5/Qt/bin
> - Create a qt.conf in the bin folder that contains just:
> [Paths]
> Prefix = ..
> - Modified PyQt5 __init__.py per my original email.
>
> I took this PyQt5 folder over to a separate “clean” machine (no Qt installed, no PyQt soruce code) with python 2.7 installed and tested that it worked (the dependency had been broken). My tests were successful on this test machine which happened to also be Windows 8.1. I actually tested it on numerous clean Windows 8.1 machines with no trouble.
> I then dropped this package onto a Windows 10 machine and ran my tests and that is when I ran into this problem.
>
> The only reason I adopted the PyQt5/Qt/.. structure is because I noted that this is what the PyQt5 Python 3 GPL version appears to do when installed by pip. I had hoped there was some magic to that setup.
The location and content of your qt.conf doesn't look right. PyQt's configure.py takes a --qtconf-prefix option which will embed a qt.conf in the QtCore module. From memory I think the value to pass is Qt/bin. The wheels use this to find the Qt installation in the wheel.
However, as far as I can tell, that doesn't explain why it currently works on Windows 8.
Phil
More information about the PyQt
mailing list