PyInstaller запускается, но возвращает пустой файл .exe - PullRequest
0 голосов
/ 27 сентября 2018

Я создал код Python, который содержит около шести вложенных файлов .py, которые содержат подфункции для моего сценария.Это очень длинный и сложный графический интерфейс.Когда я запускаю его через PyInstaller, я не получаю ошибок, и он создает файл .exe, который, однако, не запускается.Он падает, как только я пытаюсь открыть его.Или, может быть, он пуст?

Cleaning workspace
35924 INFO: PyInstaller: 3.4
35925 INFO: Python: 3.5.3
35925 INFO: Platform: Windows-10-10.0.17134-SP0
35930 INFO: UPX is not available.
35933 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Camilla Tac\\Documents\\Internships\\Untitled Folder',
 'C:\\Users\\Camilla Tac\\Documents\\Internships\\Untitled Folder']
35933 INFO: checking Analysis
35933 INFO: Building Analysis because Analysis-00.toc is non existent
35934 INFO: Initializing module dependency graph...
35940 INFO: Initializing module graph hooks...
35945 INFO: Analyzing base_library.zip ...
39073 INFO: running Analysis Analysis-00.toc
39100 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by C:\Users\Camilla Tac\AppData\Local\Programs\Python\Python35\python.exe
39884 INFO: Caching module hooks...
39892 INFO: Analyzing C:\Users\Camilla Tac\Documents\Internships\Untitled Folder\eil_viewer.py
40458 INFO: Processing pre-find module path hook   distutils
41356 INFO: Processing pre-safe import module hook   setuptools.extern.six.moves
41783 INFO: Processing pre-find module path hook   site
41784 INFO: site: retargeting to fake-dir 'C:\\Users\\Camilla Tac\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\PyInstaller\\fake-modules'
47355 INFO: Processing pre-safe import module hook   win32com
50001 INFO: Loading module hooks...
50001 INFO: Loading module hook "hook-PIL.py"...
50005 INFO: Excluding import 'tkinter'
50009 INFO:   Removing import of tkinter from module PIL.ImageTk
50010 INFO: Excluding import 'PySide'
50013 INFO:   Removing import of PySide from module PIL.ImageQt
50015 INFO: Excluding import 'PyQt4'
50021 INFO:   Removing import of PyQt4 from module PIL.ImageQt
50022 INFO: Import to be excluded not found: 'FixTk'
50023 INFO: Excluding import 'PyQt5'
50025 INFO:   Removing import of PyQt5 from module PIL.ImageQt
50027 INFO: Loading module hook "hook-pythoncom.py"...
50359 INFO: Loading module hook "hook-pywintypes.py"...
50685 INFO: Loading module hook "hook-pycparser.py"...
50915 INFO: Loading module hook "hook-numpy.core.py"...
51158 INFO: Loading module hook "hook-encodings.py"...
51248 INFO: Loading module hook "hook-PIL.Image.py"...
51583 INFO: Loading module hook "hook-sysconfig.py"...
51584 INFO: Loading module hook "hook-distutils.py"...
51586 INFO: Loading module hook "hook-numpy.py"...
51587 INFO: Loading module hook "hook-sqlite3.py"...
51692 INFO: Loading module hook "hook-setuptools.py"...
52233 INFO: Loading module hook "hook-_tkinter.py"...
52369 INFO: checking Tree
52370 INFO: Building Tree because Tree-00.toc is non existent
52370 INFO: Building Tree Tree-00.toc
52488 INFO: checking Tree
52488 INFO: Building Tree because Tree-01.toc is non existent
52488 INFO: Building Tree Tree-01.toc
52504 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
52506 INFO: Excluding import 'tkinter'
52508 INFO: Import to be excluded not found: 'FixTk'
52508 INFO: Loading module hook "hook-xml.py"...
52562 INFO: Loading module hook "hook-win32com.py"...
52624 INFO: Loading module hook "hook-lib2to3.py"...
52631 INFO: Loading module hook "hook-sqlalchemy.py"...
52851 INFO:   Found 3 sqlalchemy hidden imports
52852 WARNING: Hidden import "MySQLdb" not found!
52884 WARNING: Hidden import "sqlalchemy.sql.functions.func" not found!
52886 INFO: Excluding import 'sqlalchemy.testing'
52888 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.exclusions
52888 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.exclusions
52888 INFO:   Removing import of sqlalchemy.testing.engines from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing.warnings from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing.exclusions from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing.mock from module sqlalchemy.testing
52889 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.testing
52890 INFO:   Removing import of sqlalchemy.testing.assertsql from module sqlalchemy.testing
52890 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.util
52890 INFO:   Removing import of sqlalchemy.testing.engines from module sqlalchemy.testing.util
52890 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.util
52891 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.assertsql
52892 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.engines
52892 INFO:   Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing.engines
52892 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.testing.engines
52892 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.engines
52893 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.orm.util
52894 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.assertions
52894 INFO:   Removing import of sqlalchemy.testing.exclusions from module sqlalchemy.testing.assertions
52894 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.assertions
52894 INFO:   Removing import of sqlalchemy.testing.mock from module sqlalchemy.testing.assertions
52894 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.testing.assertions
52894 INFO:   Removing import of sqlalchemy.testing.assertsql from module sqlalchemy.testing.assertions
52895 INFO:   Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing.warnings
52895 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.warnings
52895 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.config
52896 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.mock
52896 INFO: Loading module hook "hook-pydoc.py"...
52897 INFO: Loading module hook "hook-pkg_resources.py"...
53507 INFO: Looking for ctypes DLLs
53593 INFO: Analyzing run-time hooks ...
53603 INFO: Including run-time hook 'pyi_rth_pkgres.py'
53611 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
53613 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
53620 INFO: Including run-time hook 'pyi_rth__tkinter.py'
53640 INFO: Looking for dynamic libraries
63589 INFO: Looking for eggs
63589 INFO: Using Python library C:\Users\Camilla Tac\AppData\Local\Programs\Python\Python35\python35.dll
63589 INFO: Found binding redirects: 
[]
63608 INFO: Warnings written to C:\Users\Camilla Tac\Downloads\auto-py-to-exe\auto-py-to-exe-master\build\eil_viewer\warn-eil_viewer.txt
63812 INFO: Graph cross-reference written to C:\Users\Camilla Tac\Downloads\auto-py-to-exe\auto-py-to-exe-master\build\eil_viewer\xref-eil_viewer.html
63890 INFO: checking PYZ
63890 INFO: Building PYZ because PYZ-00.toc is non existent
63890 INFO: Building PYZ (ZlibArchive) C:\Users\Camilla Tac\Downloads\auto-py-to-exe\auto-py-to-exe-master\build\eil_viewer\PYZ-00.pyz
65779 INFO: Building PYZ (ZlibArchive) C:\Users\Camilla Tac\Downloads\auto-py-to-exe\auto-py-to-exe-master\build\eil_viewer\PYZ-00.pyz completed successfully.
65830 INFO: checking PKG
65830 INFO: Building PKG because PKG-00.toc is non existent
65830 INFO: Building PKG (CArchive) PKG-00.pkg
65864 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
65865 INFO: Bootloader C:\Users\Camilla Tac\AppData\Local\Programs\Python\Python35\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
65865 INFO: checking EXE
65866 INFO: Building EXE because EXE-00.toc is non existent
65866 INFO: Building EXE from EXE-00.toc
65866 INFO: Appending archive to EXE C:\Users\Camilla Tac\Downloads\auto-py-to-exe\auto-py-to-exe-master\build\eil_viewer\eil_viewer.exe
65875 INFO: Building EXE from EXE-00.toc completed successfully.
65880 INFO: checking COLLECT
65880 INFO: Building COLLECT because COLLECT-00.toc is non existent
65881 INFO: Building COLLECT COLLECT-00.toc
68362 INFO: Building COLLECT COLLECT-00.toc completed successfully.
Moving project to: output/
Cleaning workspace
Complete.

Я использую Python 3.5.3, так как он более совместим с PyInstaller, и моя программа отлично работает на Python 3.5.

Очень важно, чтобы я получилэта программа на Python в отдельный .exe файл.

The code I run through the PyInstaller command is the following:
pyinstaller -w -F myfile.py --paths= C:\users\path to python dir\python35\lib

Однако я все еще получаю ошибку.

...