Issue409

Title No executable created with --windows-disable-console and PyQt
Priority bug Status chatting
Superseder Nosy List morefigs
Assigned To Keywords windows

Created on 2018-08-06.22:56:30 by morefigs, last changed by morefigs.

Files
File name Uploaded Type Edit Remove
minimal_example.py morefigs, 2018-08-06.22:56:30 application/octet-stream
Messages
msg2555 (view) Author: morefigs Date: 2018-11-12.04:01:28
The problem seems to be resolved! Unsure why exactly. I'm now on a new PC and
upgraded to:

Python 3.7.0 64-bit
Nuitka 0.6.0.6 64-bit

and calling:

py -m nuitka --standalone --recurse-all --disable-dll-dependency-cache
--windows-disable-console --plugin-enable=qt-plugins minimal_example.py

Feel free to close.
msg2538 (view) Author: morefigs Date: 2018-09-26.07:51:01
My PC blew up and now I'm on holidays, but 
appreciate the support and will certainly get 
back to you soon.
msg2535 (view) Author: kayhayen Date: 2018-09-26.07:36:31
No feedback?
msg2525 (view) Author: kayhayen Date: 2018-09-13.12:10:26
Can you try to use the Windows specific features that disable caching of DLL 
dependencies. I think that must be it. When you add or remove that option, it 
changes the DLLs used by the main program, but that may still be cached, and 
then bad results.

I think that is what is happing.

Yours,
Kay
msg2521 (view) Author: morefigs Date: 2018-09-07.05:41:51
The same behaviour is seen when specifically using mingw-w64
(x86_64-8.1.0-win32-seh-rt_v6-rev0).
msg2520 (view) Author: morefigs Date: 2018-09-06.04:27:30
That is to say version Nuitka Windows build 3.6 64-bit (0.5.32.7).
msg2519 (view) Author: morefigs Date: 2018-09-06.04:25:31
I tried building on a fresh Windows install, this time using Visual Studio 2017.
Compilation succeeded and the .exe created using the command:

%localappdata%\programs\python\python36\python -m nuitka --standalone
--recurse-all --plugin-enable=qt-plugins minimal_example.py

However, running it gives:
ModuleNotFoundError: No module named 'PyQt5.sip'
This is despite sip.pyd sitting right next to minimal_example.exe in the .dist
folder.

Copying sip.pyd to the PyQt5 subfolder results in a new error:
  File "C:\Users\Sam\Desktop\minimal_example.dist\minimal_example.py", line 2,
in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
ValueError: PyCapsule_GetPointer called with incorrect name

Python 3.6.6 64-bit
Nuitka Windows build 3.6 64-bit
msg2518 (view) Author: kayhayen Date: 2018-08-24.18:22:18
MinGW is not supported, only MinGW64 is. Checkout user manual about how that is 
not about bits. MinGW is just less windows compatible.

Yours,
Kay
msg2516 (view) Author: morefigs Date: 2018-08-24.01:02:19
Yes, in my case it certainly isn't producing the .exe file (and many .pyd files). I 
have MingW install so presume that is being used. Is there a way to check?
msg2490 (view) Author: kayhayen Date: 2018-08-23.22:40:23
Do you realize that the ".exe" lives in the ".dist" folder?

Your example of course works for me. Are you using MSVC or MinGW64. 
Unfortunately it's not easy for --version to make that output.

Yours,
Kay
msg2489 (view) Author: kayhayen Date: 2018-08-23.22:33:16
I am confused about you renaming "python.exe", why would you?
msg2458 (view) Author: morefigs Date: 2018-08-06.23:04:44
If --windows-disable-console is not used, but pythonw.exe is renamed to python.exe, then the exact same behaviour (no .exe, etc) is seen.
msg2456 (view) Author: morefigs Date: 2018-08-06.22:56:30
When running Nuitka on a minimal PyQt5 application (see minimal_example.py) no .exe file is generated if the --windows-disable-console flag is used. 

The following command results in no executable file generated, and only 18 .pyd files in the .dist folder:
%localappdata%\programs\python\python36-32\scripts\nuitka.bat --standalone --recurse-all --windows-disable-console --plugin-enable=qt-plugins minimal_example.py

The following command results in an executable file being generated (but also shows the console window when run), along with 90 .pyd and .dll files in the .dist folder:
%localappdata%\programs\python\python36-32\scripts\nuitka.bat --standalone --recurse-all --plugin-enable=qt-plugins minimal_example.py

Versions:
Windows 10 64-bit version 1803
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] on win32
Nuitka 0.5.32.3
History
Date User Action Args
2018-11-12 04:01:29morefigssetmessages: + msg2555
2018-09-26 07:51:01morefigssetmessages: + msg2538
2018-09-26 07:36:31kayhayensetmessages: + msg2535
2018-09-13 12:10:27kayhayensetmessages: + msg2525
2018-09-07 05:41:51morefigssetmessages: + msg2521
2018-09-06 04:27:30morefigssetmessages: + msg2520
2018-09-06 04:25:33morefigssetmessages: + msg2519
2018-08-24 18:22:18kayhayensetmessages: + msg2518
2018-08-24 01:02:19morefigssetmessages: + msg2516
2018-08-24 01:00:06morefigssetmessages: - msg2515
2018-08-24 00:59:58morefigssetstatus: resolved -> chatting
messages: + msg2515
2018-08-23 22:40:23kayhayensetstatus: chatting -> resolved
messages: + msg2490
2018-08-23 22:33:16kayhayensetmessages: + msg2489
2018-08-06 23:04:44morefigssetmessages: + msg2458
2018-08-06 23:04:35morefigssetmessages: - msg2457
2018-08-06 23:04:17morefigssetstatus: unread -> chatting
messages: + msg2457
2018-08-06 22:56:30morefigscreate