Cursor spinning problem with Console=False and Tkinter or PyQt on windows #8358
-
Hi, Operating system : Windows 11 Step 1Here is a simple app to reproduce the bug/problem import tkinter as tk
root = tk.Tk()
root.title("Hello World Application")
root.geometry("300x150")
hello_label = tk.Label(root, text="Hello World!", font=("Arial", 16))
hello_label.pack(expand=True)
root.mainloop() I'am using the --onefile mode (-F), no problem if it's not --onefile If in Step 2Changing to console=False, will cause the cursor to have a loading spinning wheel for several seconds... The problem occurred also with PyQt. The only workaround that I found is to don't use --onefile for app which have a GUI. Thanks a lot for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
I suspect this happens because when you use windowed/noconsole mode, Windows expects the launched process to show a window. If it does not, it spins that spinning wheel for a certain amount of time. In onedir mode, there is only one process, and your python code (which displays window) runs in it. So there is not problem In onefile mode, there are two processes. The one you launch unpacks the application into temporary directory, and then runs a child process, which actually executes your python code. So the window is shown by the child process, while the OS is waiting for the parent process to show the window, and is displaying the spinning wheel. As a quick test, can you try adding splash screen to the windowed onefile application? Since that will show the splash window in the parent process, I think it should remove the spinning wheel. (Make sure you close the splash screen at the very start of your program, though. See here). |
Beta Was this translation helpful? Give feedback.
-
Thanks for this answer. It's now working with a splash screen of 1x1 px png transparent file. So this is an acceptable workaround ! Thanks a lot, do you know if there is another way to handle this problem ? # Import the tkinter module
import tkinter as tk
import pyi_splash
pyi_splash.close()
root = tk.Tk()
root.title("Hello World Application")
root.geometry("300x150")
hello_label = tk.Label(root, text="Hello World!", font=("Arial", 16))
hello_label.pack(expand=True)
root.mainloop() |
Beta Was this translation helpful? Give feedback.
-
Doesn't work on my side cursor is still spinning.
Successfully uninstalled pyinstaller-6.5.0
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> set PYINSTALLER_COMPILE_BOOTLOADER=1
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> pip install https://github.com/rokm/pyinstaller/archive/refs/heads/windows-spinning-cursor.zip
Collecting https://github.com/rokm/pyinstaller/archive/refs/heads/windows-spinning-cursor.zip
Downloading https://github.com/rokm/pyinstaller/archive/refs/heads/windows-spinning-cursor.zip
- 4.7 MB 3.3 MB/s 0:00:01
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools>=42.0.0 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (69.2.0)
Requirement already satisfied: altgraph in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (0.17.4)
Requirement already satisfied: pyinstaller-hooks-contrib>=2024.3 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (2024.3)
Requirement already satisfied: packaging>=22.0 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (24.0)
Requirement already satisfied: pefile>=2022.5.30 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (2023.2.7)
Requirement already satisfied: pywin32-ctypes>=0.2.1 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (0.2.2)
Building wheels for collected packages: pyinstaller
Building wheel for pyinstaller (pyproject.toml) ... done
Created wheel for pyinstaller: filename=pyinstaller-6.5.0-py3-none-any.whl size=2240393 sha256=fef9d84bfbe28dac0403ca0a14c504fde87f0efc50e3a634d70a1e261a7094c7
Stored in directory: c:\users\remi\appdata\local\pip\cache\wheels\6a\00\93\2077b60b08f6b865f47f6df7cf012f1d9269a8e92bff5e342a
Successfully built pyinstaller
Installing collected packages: pyinstaller
Successfully installed pyinstaller-6.5.0 |
Beta Was this translation helpful? Give feedback.
-
Sorry it doesn't work. If it could help you. here is the log : (.venv) PS C:\Users\remi\Desktop\Test\QTTEST> pip uninstall pyinstaller
Found existing installation: pyinstaller 6.5.0
Uninstalling pyinstaller-6.5.0:
Would remove:
c:\users\remi\desktop\test\qttest\.venv\lib\site-packages\__editable__.pyinstaller-6.5.0.pth
c:\users\remi\desktop\test\qttest\.venv\lib\site-packages\__editable___pyinstaller_6_5_0_finder.py
c:\users\remi\desktop\test\qttest\.venv\lib\site-packages\pyinstaller-6.5.0.dist-info\*
c:\users\remi\desktop\test\qttest\.venv\scripts\pyi-archive_viewer.exe
c:\users\remi\desktop\test\qttest\.venv\scripts\pyi-bindepend.exe
c:\users\remi\desktop\test\qttest\.venv\scripts\pyi-grab_version.exe
c:\users\remi\desktop\test\qttest\.venv\scripts\pyi-makespec.exe
c:\users\remi\desktop\test\qttest\.venv\scripts\pyi-set_version.exe
c:\users\remi\desktop\test\qttest\.venv\scripts\pyinstaller.exe
Proceed (Y/n)? y
Successfully uninstalled pyinstaller-6.5.0
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> $env:PYINSTALLER_COMPILE_BOOTLOADER=1
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> set PYINSTALLER_COMPILE_BOOTLOADER=1
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> git clone https://github.com/rokm/pyinstaller.git -b windows-spinning-cursor
Cloning into 'pyinstaller'...
remote: Enumerating objects: 62441, done.
remote: Counting objects: 100% (1225/1225), done.
remote: Compressing objects: 100% (542/542), done.
Receiving objects: 100% (62441/62441), 60.36 MiB | 24.93 MiB/s, done.61216Receiving objects: 100% (62441/62441), 49.57 MiB | 24.58 MiB/s
Resolving deltas: 100% (46364/46364), done.
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> cd pyinstaller
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST\pyinstaller> cd bootloader
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader> python waf all
'all' finished successfully (0.000s)
'distclean' finished successfully (0.000s)
Setting top to : C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader
Setting out to : C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build
Python Version : 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)]
MSVC target(s) : ['x64', 'x86_amd64']
Checking for 'msvc' (C compiler) : C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\CL.exe
Checking size of pointer : 8
Platform : Windows-64bit-intel detected based on compiler
Build tests : disabled
Checking for function unsetenv : no
Checking for function mkdtemp : no
Checking for function dirname : no
Checking for function basename : no
Checking for function strnlen : yes
'configure' finished successfully (1.446s)
'make_all' finished successfully (0.003s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debug'
[ 1/22] Compiling zlib\zutil.c
[ 2/22] Compiling zlib\inffast.c
[ 3/22] Compiling zlib\adler32.c
[ 4/22] Compiling zlib\inftrees.c
[ 5/22] Compiling zlib\crc32.c
[ 6/22] Compiling zlib\inflate.c
[ 7/22] Compiling src\pyi_python.c
[ 8/22] Compiling src\pyi_apple_events.c
[ 9/22] Compiling src\pyi_global.c
[10/22] Compiling src\pyi_pyconfig.c
[11/22] Compiling src\pyi_pythonlib.c
[12/22] Compiling src\pyi_path.c
[13/22] Compiling src\pyi_main.c
[14/22] Compiling src\pyi_archive.c
[15/22] Compiling src\pyi_win32_utils.c
[16/22] Compiling src\pyi_splashlib.c
zutil.c
[17/22] Compiling src\pyi_splash.c
[18/22] Compiling src\pyi_launch.c
[19/22] Compiling src\pyi_utils.c
[20/22] Compiling src\pyi_exception_dialog.c
[21/22] Compiling src\main.c
pyi_apple_events.c
inffast.c
inftrees.c
pyi_exception_dialog.c
crc32.c
adler32.c
inflate.c
pyi_python.c
pyi_path.c
pyi_global.c
pyi_win32_utils.c
pyi_splashlib.c
main.c
pyi_pythonlib.c
pyi_main.c
pyi_splash.c
pyi_archive.c
pyi_launch.c
pyi_pyconfig.c
pyi_utils.c
[22/22] Linking build\debug\run_d.exe
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debug'
'build_debug' finished successfully (0.339s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\release'
[ 1/22] Compiling zlib\zutil.c
[ 2/22] Compiling zlib\inffast.c
[ 3/22] Compiling zlib\adler32.c
[ 4/22] Compiling zlib\inftrees.c
[ 5/22] Compiling zlib\crc32.c
[ 6/22] Compiling zlib\inflate.c
[ 7/22] Compiling src\pyi_python.c
[ 8/22] Compiling src\pyi_apple_events.c
[ 9/22] Compiling src\pyi_global.c
[10/22] Compiling src\pyi_pyconfig.c
[11/22] Compiling src\pyi_pythonlib.c
[12/22] Compiling src\pyi_path.c
[13/22] Compiling src\pyi_main.c
[14/22] Compiling src\pyi_archive.c
[15/22] Compiling src\pyi_win32_utils.c
[16/22] Compiling src\pyi_splashlib.c
[17/22] Compiling src\pyi_splash.c
[18/22] Compiling src\pyi_launch.c
zutil.c
[19/22] Compiling src\pyi_utils.c
[20/22] Compiling src\pyi_exception_dialog.c
[21/22] Compiling src\main.c
pyi_apple_events.c
inftrees.c
inffast.c
crc32.c
pyi_exception_dialog.c
adler32.c
inflate.c
pyi_pythonlib.c
pyi_global.c
pyi_path.c
pyi_python.c
pyi_splashlib.c
pyi_pyconfig.c
main.c
pyi_win32_utils.c
pyi_main.c
pyi_utils.c
pyi_splash.c
pyi_archive.c
pyi_launch.c
[22/22] Linking build\release\run.exe
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\release'
'build_release' finished successfully (0.340s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debugw'
[ 1/22] Compiling zlib\zutil.c
[ 2/22] Compiling zlib\inffast.c
[ 3/22] Compiling zlib\adler32.c
[ 4/22] Compiling zlib\inftrees.c
[ 5/22] Compiling zlib\crc32.c
[ 6/22] Compiling zlib\inflate.c
[ 7/22] Compiling src\pyi_python.c
[ 8/22] Compiling src\pyi_apple_events.c
[ 9/22] Compiling src\pyi_global.c
[10/22] Compiling src\pyi_pyconfig.c
[11/22] Compiling src\pyi_pythonlib.c
[12/22] Compiling src\pyi_path.c
[13/22] Compiling src\pyi_main.c
zutil.c
[14/22] Compiling src\pyi_archive.c
[15/22] Compiling src\pyi_win32_utils.c
[16/22] Compiling src\pyi_splashlib.c
[17/22] Compiling src\pyi_splash.c
[18/22] Compiling src\pyi_launch.c
[19/22] Compiling src\pyi_utils.c
[20/22] Compiling src\pyi_exception_dialog.c
[21/22] Compiling src\main.c
pyi_apple_events.c
inffast.c
inftrees.c
crc32.c
adler32.c
inflate.c
pyi_pythonlib.c
pyi_path.c
pyi_global.c
pyi_splashlib.c
pyi_python.c
pyi_archive.c
pyi_pyconfig.c
pyi_splash.c
pyi_win32_utils.c
pyi_main.c
pyi_launch.c
main.c
pyi_utils.c
pyi_exception_dialog.c
[22/22] Linking build\debugw\runw_d.exe
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debugw'
'build_debugw' finished successfully (0.333s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\releasew'
[ 1/22] Compiling zlib\zutil.c
[ 2/22] Compiling zlib\inffast.c
[ 3/22] Compiling zlib\adler32.c
[ 4/22] Compiling zlib\inftrees.c
[ 5/22] Compiling zlib\crc32.c
[ 6/22] Compiling zlib\inflate.c
[ 7/22] Compiling src\pyi_python.c
[ 8/22] Compiling src\pyi_apple_events.c
[ 9/22] Compiling src\pyi_global.c
[10/22] Compiling src\pyi_pyconfig.c
[11/22] Compiling src\pyi_pythonlib.c
[12/22] Compiling src\pyi_path.c
[13/22] Compiling src\pyi_main.c
[14/22] Compiling src\pyi_archive.c
[15/22] Compiling src\pyi_win32_utils.c
[16/22] Compiling src\pyi_splashlib.c
[17/22] Compiling src\pyi_splash.c
[18/22] Compiling src\pyi_launch.c
pyi_apple_events.c
[19/22] Compiling src\pyi_utils.c
zutil.c
[20/22] Compiling src\pyi_exception_dialog.c
[21/22] Compiling src\main.c
inffast.c
inftrees.c
crc32.c
adler32.c
inflate.c
pyi_python.c
pyi_pythonlib.c
pyi_global.c
pyi_path.c
main.c
pyi_pyconfig.c
pyi_splashlib.c
pyi_win32_utils.c
pyi_exception_dialog.c
pyi_splash.c
pyi_main.c
pyi_utils.c
pyi_archive.c
pyi_launch.c
[22/22] Linking build\releasew\runw.exe
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\releasew'
'build_releasew' finished successfully (0.334s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debug'
+ install C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\PyInstaller\bootloader\Windows-64bit-intel\run_d.exe (from build\debug\run_d.exe)
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debug'
'install_debug' finished successfully (0.018s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\release'
+ install C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\PyInstaller\bootloader\Windows-64bit-intel\run.exe (from build\release\run.exe)
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\release'
'install_release' finished successfully (0.018s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debugw'
+ install C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\PyInstaller\bootloader\Windows-64bit-intel\runw_d.exe (from build\debugw\runw_d.exe)
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\debugw'
'install_debugw' finished successfully (0.018s)
Waf: Entering directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\releasew'
+ install C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\PyInstaller\bootloader\Windows-64bit-intel\runw.exe (from build\releasew\runw.exe)
Waf: Leaving directory `C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader\build\releasew'
'install_releasew' finished successfully (0.018s)
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\bootloader> cd ..
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST\pyinstaller> git status
On branch windows-spinning-cursor
Your branch is up to date with 'origin/windows-spinning-cursor'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: PyInstaller/bootloader/Windows-64bit-intel/run.exe
modified: PyInstaller/bootloader/Windows-64bit-intel/run_d.exe
modified: PyInstaller/bootloader/Windows-64bit-intel/runw.exe
modified: PyInstaller/bootloader/Windows-64bit-intel/runw_d.exe
no changes added to commit (use "git add" and/or "git commit -a")
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST\pyinstaller> pip install -e .
Obtaining file:///C:/Users/remi/Desktop/Test/QTTEST/pyinstaller
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools>=42.0.0 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (69.2.0)
Requirement already satisfied: altgraph in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (0.17.4)
Requirement already satisfied: pyinstaller-hooks-contrib>=2024.3 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (2024.3)
Requirement already satisfied: packaging>=22.0 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (24.0)
Requirement already satisfied: pefile>=2022.5.30 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (2023.2.7)
Requirement already satisfied: pywin32-ctypes>=0.2.1 in c:\users\remi\desktop\test\qttest\.venv\lib\site-packages (from pyinstaller==6.5.0) (0.2.2)
Building wheels for collected packages: pyinstaller
Building editable for pyinstaller (pyproject.toml) ... done
Created wheel for pyinstaller: filename=pyinstaller-6.5.0-0.editable-py3-none-any.whl size=17179 sha256=d9ce84b81c78766a3ad1c34d9cb037635433bf95067f3fa3a84df8efd7e50897
Stored in directory: C:\Users\remi\AppData\Local\Temp\pip-ephem-wheel-cache-mudkypky\wheels\83\d7\8a\31a61a4c707c8152cee16351a5325ffc58b1f9f83421d0d3c6
Successfully built pyinstaller
Installing collected packages: pyinstaller
Successfully installed pyinstaller-6.5.0
[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST\pyinstaller> cd ..
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> pyinstaller --clean --onefile --noconsole hello.py
310 INFO: PyInstaller: 6.5.0+g54b81c56.mod, contrib hooks: 2024.3
310 INFO: Python: 3.12.2
333 INFO: Platform: Windows-11-10.0.22631-SP0
333 INFO: wrote C:\Users\remi\Desktop\Test\QTTEST\hello.spec
369 INFO: UPX is available and will be used if enabled on build targets.
369 INFO: Removing temporary files and cleaning cache in C:\Users\remi\AppData\Local\pyinstaller
372 INFO: Extending PYTHONPATH with paths
['C:\\Users\\remi\\Desktop\\Test\\QTTEST']
578 INFO: checking Analysis
578 INFO: Building Analysis because Analysis-00.toc is non existent
578 INFO: Initializing module dependency graph...
579 INFO: Caching module graph hooks...
585 INFO: Analyzing base_library.zip ...
1423 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
2552 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3024 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3255 INFO: Caching module dependency graph...
3308 INFO: Running Analysis Analysis-00.toc
3308 INFO: Looking for Python shared library...
3312 INFO: Using Python shared library: C:\Users\remi\AppData\Local\Programs\Python\Python312\python312.dll
3312 INFO: Analyzing C:\Users\remi\Desktop\Test\QTTEST\hello.py
3372 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3375 INFO: Processing module hooks...
3377 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3377 INFO: checking Tree
3377 INFO: Building Tree because Tree-00.toc is non existent
3378 INFO: Building Tree Tree-00.toc
3404 INFO: checking Tree
3405 INFO: Building Tree because Tree-01.toc is non existent
3405 INFO: Building Tree Tree-01.toc
3408 INFO: checking Tree
3408 INFO: Building Tree because Tree-02.toc is non existent
3408 INFO: Building Tree Tree-02.toc
3414 INFO: Performing binary vs. data reclassification (925 entries)
3524 INFO: Looking for ctypes DLLs
3526 INFO: Analyzing run-time hooks ...
3527 INFO: Including run-time hook 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
3528 INFO: Including run-time hook 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
3540 INFO: Looking for dynamic libraries
3631 INFO: Extra DLL search directories (AddDllDirectory): []
3631 INFO: Extra DLL search directories (PATH): []
3736 INFO: Warnings written to C:\Users\remi\Desktop\Test\QTTEST\build\hello\warn-hello.txt
3745 INFO: Graph cross-reference written to C:\Users\remi\Desktop\Test\QTTEST\build\hello\xref-hello.html
3766 INFO: checking PYZ
3766 INFO: Building PYZ because PYZ-00.toc is non existent
3766 INFO: Building PYZ (ZlibArchive) C:\Users\remi\Desktop\Test\QTTEST\build\hello\PYZ-00.pyz
3922 INFO: Building PYZ (ZlibArchive) C:\Users\remi\Desktop\Test\QTTEST\build\hello\PYZ-00.pyz completed successfully.
3935 INFO: checking PKG
3935 INFO: Building PKG because PKG-00.toc is non existent
3935 INFO: Building PKG (CArchive) hello.pkg
3959 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\python312.dll
5472 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_decimal.pyd
5551 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_hashlib.pyd
5595 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_lzma.pyd
5655 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_bz2.pyd
5707 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\unicodedata.pyd
5934 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\select.pyd
5973 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_socket.pyd
6020 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_tkinter.pyd
6065 INFO: Disabling UPX for C:\Users\remi\AppData\Local\Programs\Python\Python312\VCRUNTIME140.dll due to CFG!
6079 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\libcrypto-3.dll
7116 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\tk86t.dll
7476 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\tcl86t.dll
7906 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\zlib1.dll
8441 INFO: Building PKG (CArchive) hello.pkg completed successfully.
8450 INFO: Bootloader C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\PyInstaller\bootloader\Windows-64bit-intel\runw.exe
8451 INFO: checking EXE
8451 INFO: Building EXE because EXE-00.toc is non existent
8451 INFO: Building EXE from EXE-00.toc
8451 INFO: Copying bootloader EXE to C:\Users\remi\Desktop\Test\QTTEST\dist\hello.exe
8454 INFO: Copying icon to EXE
8462 INFO: Copying 0 resources to EXE
8462 INFO: Embedding manifest in EXE
8471 INFO: Appending PKG archive to EXE
8481 INFO: Fixing EXE headers
8571 INFO: Building EXE from EXE-00.toc completed successfully.
(.venv) PS C:\Users\remi\Desktop\Test\QTTEST> |
Beta Was this translation helpful? Give feedback.
-
Nothing found in After uninstall, compilation, and rebuilding. Nothing work. The application doesn't start and I'm forced to use |
Beta Was this translation helpful? Give feedback.
-
Works fine now !! Thanks a lot. Just have a strange error when building the app for PyQT6. This error doesn't occur without PyQT. (.venv) PS C:\Users\remi\Desktop\Test\QTTEST> pyinstaller --clean --onefile --noconsole hello.py
226 INFO: PyInstaller: 6.5.0+g54b81c56.mod, contrib hooks: 2024.3
227 INFO: Python: 3.12.2
246 INFO: Platform: Windows-11-10.0.22631-SP0
247 INFO: wrote C:\Users\remi\Desktop\Test\QTTEST\hello.spec
279 INFO: UPX is available and will be used if enabled on build targets.
279 INFO: Removing temporary files and cleaning cache in C:\Users\remi\AppData\Local\pyinstaller
285 INFO: Extending PYTHONPATH with paths
['C:\\Users\\remi\\Desktop\\Test\\QTTEST']
480 INFO: checking Analysis
480 INFO: Building Analysis because Analysis-00.toc is non existent
480 INFO: Initializing module dependency graph...
481 INFO: Caching module graph hooks...
487 INFO: Analyzing base_library.zip ...
1478 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
2277 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
2850 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3054 INFO: Caching module dependency graph...
3107 INFO: Running Analysis Analysis-00.toc
3107 INFO: Looking for Python shared library...
3110 INFO: Using Python shared library: C:\Users\remi\AppData\Local\Programs\Python\Python312\python312.dll
3111 INFO: Analyzing C:\Users\remi\Desktop\Test\QTTEST\hello.py
3114 INFO: Loading module hook 'hook-PyQt6.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3184 INFO: Loading module hook 'hook-PyQt6.QtCore.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3264 INFO: Loading module hook 'hook-PyQt6.QtGui.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3409 INFO: Loading module hook 'hook-PyQt6.QtWidgets.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3483 INFO: Processing module hooks...
3501 INFO: Performing binary vs. data reclassification (108 entries)
3519 INFO: Looking for ctypes DLLs
3521 INFO: Analyzing run-time hooks ...
3522 INFO: Including run-time hook 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
3523 INFO: Including run-time hook 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt6.py'
3524 INFO: Processing pre-find module path hook _pyi_rth_utils from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks\\pre_find_module_path\\hook-_pyi_rth_utils.py'.
3525 INFO: Loading module hook 'hook-_pyi_rth_utils.py' from 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks'...
3527 INFO: Including run-time hook 'C:\\Users\\remi\\Desktop\\Test\\QTTEST\\pyinstaller\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
3531 INFO: Looking for dynamic libraries
3611 INFO: Extra DLL search directories (AddDllDirectory): ['C:\\Users\\remi\\Desktop\\Test\\QTTEST\\.venv\\Lib\\site-packages\\PyQt6\\Qt6\\bin']
3612 INFO: Extra DLL search directories (PATH): ['C:\\Users\\remi\\Desktop\\Test\\QTTEST\\.venv\\Lib\\site-packages\\PyQt6\\Qt6\\bin']
3896 INFO: Warnings written to C:\Users\remi\Desktop\Test\QTTEST\build\hello\warn-hello.txt
3905 INFO: Graph cross-reference written to C:\Users\remi\Desktop\Test\QTTEST\build\hello\xref-hello.html
3919 INFO: checking PYZ
3919 INFO: Building PYZ because PYZ-00.toc is non existent
3920 INFO: Building PYZ (ZlibArchive) C:\Users\remi\Desktop\Test\QTTEST\build\hello\PYZ-00.pyz
4066 INFO: Building PYZ (ZlibArchive) C:\Users\remi\Desktop\Test\QTTEST\build\hello\PYZ-00.pyz completed successfully.
4073 INFO: checking PKG
4073 INFO: Building PKG because PKG-00.toc is non existent
4073 INFO: Building PKG (CArchive) hello.pkg
4092 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\python312.dll
5542 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\styles\qwindowsvistastyle.dll due to CFG!
5542 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qwbmp.dll due to CFG!
5543 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qico.dll due to CFG!
5543 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qicns.dll due to CFG!
5543 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qpdf.dll due to CFG!
5544 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qtiff.dll due to CFG!
5544 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qjpeg.dll due to CFG!
5545 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\iconengines\qsvgicon.dll due to CFG!
5545 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\platforms\qwindows.dll due to CFG!
5546 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qwebp.dll due to CFG!
5546 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\generic\qtuiotouchplugin.dll due to CFG!
5546 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\platforms\qoffscreen.dll due to CFG!
5547 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qtga.dll due to CFG!
5547 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\platforms\qminimal.dll due to CFG!
5547 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qgif.dll due to CFG!
5548 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\plugins\imageformats\qsvg.dll due to CFG!
5600 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\PyQt6\Qt6\bin\opengl32sw.dll
10643 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_decimal.pyd
10723 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_hashlib.pyd
10768 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_lzma.pyd
10830 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_bz2.pyd
10881 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\unicodedata.pyd
11106 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\select.pyd
11144 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\_socket.pyd
11206 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\PyQt6\QtWidgets.pyd
12381 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\PyQt6\QtGui.pyd
12883 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\PyQt6\QtCore.pyd
13432 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\PyQt6\sip.cp312-win_amd64.pyd
13491 INFO: Disabling UPX for C:\Users\remi\AppData\Local\Programs\Python\Python312\VCRUNTIME140.dll due to CFG!
13491 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\Qt6Widgets.dll due to CFG!
13491 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\Qt6Core.dll due to CFG!
13492 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\Qt6Gui.dll due to CFG!
13492 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\Qt6Pdf.dll due to CFG!
13493 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\Qt6Svg.dll due to CFG!
13493 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\MSVCP140.dll due to CFG!
13493 INFO: Disabling UPX for C:\Users\remi\AppData\Local\Programs\Python\Python312\VCRUNTIME140_1.dll due to CFG!
13494 INFO: Disabling UPX for C:\Users\remi\Desktop\Test\QTTEST\.venv\Lib\site-packages\PyQt6\Qt6\bin\Qt6Network.dll due to CFG!
13507 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\libcrypto-3.dll
14535 INFO: Executing: upx --compress-icons=0 --lzma -q --strip-loadconf C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\python3.dll
14571 WARNING: Failed to upx strip on 'C:\\Users\\remi\\AppData\\Local\\pyinstaller\\bincache01py31264bit\\python3.dll'!
Traceback (most recent call last):
File "C:\Users\remi\Desktop\Test\QTTEST\pyinstaller\PyInstaller\building\utils.py", line 283, in process_collected_binary
p = subprocess.run(
^^^^^^^^^^^^^^^
File "C:\Users\remi\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['upx', '--compress-icons=0', '--lzma', '-q', '--strip-loadconf', 'C:\\Users\\remi\\AppData\\Local\\pyinstaller\\bincache01py31264bit\\python3.dll']' returned non-zero exit status 1.
14572 WARNING: Output from upx command:
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 3rd 2024
File size Ratio Format Name
-------------------- ------ ----------- -----------
upx: C:\Users\remi\AppData\Local\pyinstaller\bincache01py31264bit\python3.dll: NotCompressibleException
Packed 1 file: 0 ok, 1 error.
|
Beta Was this translation helpful? Give feedback.
The parent process would somehow need to notify the OS that it is alive. I'll have to look into what exactly is required for that (I would very much prefer to avoid having to create a window just to work around this).