Howto: Python3.6 + PyQT5 + pyqtdeploy -> exe:
Installed Visual Studio 2017 Community Edition or whatever is the newest version. Remember to install SDK packages to get the needed headers and such.
After installation, vcvarsall.bat should be found from the following path:
> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
Installed Qt SDK version 5.8.0
I had to patch qalgorithms.h so it works with VS 2017:
> https://codereview.qt-project.org/#/c/177743/
> Download the .h file and replace it, make a backup just in case from the old version
Added a new ENV variable called INCLUDE so the compiler finds all of the neeeded header files and such:
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt;
> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include;
> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;
Now you should have the needed headers and windows libs installed. Next up pyqtdeploy
> pip install pyqtdeploy
From pyqtdeploy documentation:
"pyqtdeploy requires these to be compiled ready for static linking:
-> sip module (an extension module, written in C.)
-> pyqt module (an extension module, written in C.)"
This means its time to compile these things from the sources. Get the source packages for these two components and follow the instructions stated here:
https://stackoverflow.com/a/40779370
When finished with compiling and installation, copy all of the necessary .lib files from sip and PyQT directories and put them in a location so the linker finds them.
> sip: <sip-sourcedir>\siplib\sip.pyd & sip.lib
> PyQT5: <component>\release\<component>.lib
> sip libs I copied to python\site-packages\
> PyQT5 libs I copied to python\site-packages\PyQt5
Run vcvarsall.bat and start pyqtdeploy like so:
> "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
> pyqtdeploy
Configure your settings accordingly -> Build!
Use windeployqt.bat from QT SDK to copy necessary DLL files to your build dir from QT SDK
> C:\Qt\<version>\msvc2015\bin\windeployqt.bat -h
Problem I encountered afterwards:
> "Application failed to start because platform plugin “windows” is missing"
> The libEGL.dll was missing. Run windeployqt with --compiler-runtime flag
I hope these guidelines might help you on your struggle to deploy your program!