Witam
Mam problem z zbudowaniem pliku exe z mojego programu. Buduję program wydając komendę :
pyinstaller --onefile --windowed main.py
Logi:
46 INFO: PyInstaller: 4.0.dev0+9dd34bdfba
46 INFO: Python: 3.8.0
46 INFO: Platform: Windows-10-10.0.17763-SP0
46 INFO: wrote C:\Users\dpalus\Documents\Projekty\Start\main.spec
46 INFO: UPX is not available.
62 INFO: Extending PYTHONPATH with paths
['C:\\Users\\dpalus\\Documents\\Projekty\\Start',
'C:\\Users\\dpalus\\Documents\\Projekty\\Start']
62 INFO: checking Analysis
62 INFO: Building Analysis because Analysis-00.toc is non existent
62 INFO: Initializing module dependency graph...
62 INFO: Caching module graph hooks...
68 INFO: Analyzing base_library.zip ...
3339 INFO: Caching module dependency graph...
3430 INFO: running Analysis Analysis-00.toc
3430 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\program files\python38\python.exe
3501 INFO: Analyzing C:\Users\dpalus\Documents\Projekty\Start\main.py
3509 INFO: Processing module hooks...
3509 INFO: Loading module hook "hook-encodings.py"...
3581 INFO: Loading module hook "hook-pydoc.py"...
3581 INFO: Loading module hook "hook-PyQt5.py"...
3681 WARNING: Hidden import "sip" not found!
3681 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
3750 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
3851 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
4032 INFO: Loading module hook "hook-xml.py"...
4226 INFO: Looking for ctypes DLLs
4234 INFO: Analyzing run-time hooks ...
4234 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
4234 INFO: Including run-time hook 'pyi_rth_pyqt5.py'
4244 INFO: Looking for dynamic libraries
5126 INFO: Looking for eggs
5126 INFO: Using Python library c:\program files\python38\python38.dll
5134 INFO: Found binding redirects:
[]
5134 INFO: Warnings written to C:\Users\dpalus\Documents\Projekty\Start\build\main\warn-main.txt
5175 INFO: Graph cross-reference written to C:\Users\dpalus\Documents\Projekty\Start\build\main\xref-main.html
5175 INFO: checking PYZ
5175 INFO: Building PYZ because PYZ-00.toc is non existent
5175 INFO: Building PYZ (ZlibArchive) C:\Users\dpalus\Documents\Projekty\Start\build\main\PYZ-00.pyz
5790 INFO: Building PYZ (ZlibArchive) C:\Users\dpalus\Documents\Projekty\Start\build\main\PYZ-00.pyz completed successfully.
5792 INFO: checking PKG
5792 INFO: Building PKG because PKG-00.toc is non existent
5792 INFO: Building PKG (CArchive) PKG-00.pkg
16449 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
16464 INFO: Bootloader c:\program files\python38\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
16464 INFO: checking EXE
16464 INFO: Building EXE because EXE-00.toc is non existent
16464 INFO: Building EXE from EXE-00.toc
16464 INFO: Appending archive to EXE C:\Users\dpalus\Documents\Projekty\Start\dist\main.exe
16603 INFO: Building EXE from EXE-00.toc completed successfully.
Gdy chcę uruchomić program za pomocą exe dostaje komunikat failed to execute script main. Zawsze ta komenda działała do czasu gdy dostałem nowego laptopa i musiałem na nowo po instalować wszystkie rzeczy. Czy jest jakiś sposób by plik exe budował się prawidłowo ? Dodam że aplikacja jest okienkowa pisana w Pyqt5.