Я пробовал много комбинаций, таких как установка PyQt5 только из-за отсутствующих ниже модулей, таких как PyQt4.QtCore, подпроцесс, маринование и т. Д.
Также я попытался найти путь к данным и импортировать скрытые линии, но все равно получал ошибку _tkinter в качестве предупреждения. Я не уверен, что я что-то упустил. Я проверил много вопросов о stackoverflow и попробовал много советов. Возможно, я что-то упустил. Направление помочь было бы здорово. Заранее спасибо!
Команда Pyinstaller для создания .exe
pyinstaller --noconfirm --log-level=WARN --log-level=DEBUG --onedir --noconsole --noupx -i icon=parser.ico incparser21jun.spec incparser21jun.py
Файл спецификации:
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['incparser21jun.py'],
pathex=['C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.18362.0\\ucrt\\DLLs\\x86',
'C:\\Users\\userid\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts',
'C:\\Users\\userid\\AppData\\Local\\Programs\\Python\\Python36-32\\libs',
'C:\\Users\\userid\\AppData\\Local\\Programs\\Python\\Python36-32\\Lib'
],
binaries=[],
datas=[
('C:\\Users\\userid\\AppData\\Local\\Programs\\Python\\Python36-32\\Lib\\site-packages\\ttkthemes','ttkthemes'),
('C:\\Users\\userid\\AppData\\Local\\Programs\\Python\\Python36-32\\Lib\\tkinter','tkinter')
],
hiddenimports=['tkinter', 'ttkthemes'],
hookspath=[],
runtime_hooks=[],
excludes=['olefile', 'posix'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='incparser21jun',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
upx_exclude=[],
runtime_tmpdir=None,
console=False , icon='parser.ico')
Включено в incparser21jun.py
import os, sys, re, binascii # IMPORT LOGGING
import string
import logging
import textwrap
from tkinter import *
from tkinter.ttk import *
from tkinter import ttk
from tkinter import filedialog
from tkinter import messagebox
from ttkthemes import themed_tk as tk # lets style the window
from ttkthemes import ThemedTk
Предупреждающее сообщение в папке Build:
This file lists modules PyInstaller was not able to find. This does not
necessarily mean this module is required for running you program. Python and
Python 3rd-party packages include a lot of conditional or optional module. For
example the module 'ntpath' only exists on Windows, whereas the module
'posixpath' only exists on Posix systems.
Types if import:
* top-level: imported at the top-level - look at these first
* conditional: imported within an if-statement
* delayed: imported from within a function
* optional: imported within a try-except-statement
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
yourself tracking down the missing module. Thanks!
missing module named _posixsubprocess - imported by subprocess (conditional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named org - imported by pickle (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named _winreg - imported by platform (delayed, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named _scproxy - imported by urllib.request (conditional)
missing module named java - imported by platform (delayed), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named 'java.lang' - imported by platform (delayed, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level), xml.sax._exceptions (conditional)
missing module named vms_lib - imported by platform (delayed, conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named termios - imported by tty (top-level), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level), getpass (optional)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named UserDict - imported by PIL.PdfParser (optional)
missing module named __builtin__ - imported by PIL.Image (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named cffi - imported by PIL.Image (optional), PIL.PyAccess (top-level), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level), PIL.ImageTk (delayed, conditional, optional)
missing module named grp - imported by shutil (optional), tarfile (optional), pathlib (delayed), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named pathlib2 - imported by PIL.Image (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named 'org.python' - imported by copy (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level), xml.sax (delayed, conditional)
missing module named PySide2 - imported by PIL.ImageQt (conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named 'PySide2.QtCore' - imported by PIL.ImageQt (conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named PyQt4 - imported by C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named 'PyQt4.QtCore' - imported by PIL.ImageQt (conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named PySide - imported by C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named 'PySide.QtCore' - imported by PIL.ImageQt (conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
excluded module named olefile - imported by PIL.FpxImagePlugin (top-level), PIL.MicImagePlugin (top-level)
missing module named numpy - imported by PIL.ImageFilter (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named tkimg - imported by ttkthemes._widget (delayed, conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
excluded module named posix - imported by os (conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named pwd - imported by posixpath (delayed, conditional), shutil (optional), tarfile (optional), http.server (delayed, optional), webbrowser (delayed), pathlib (delayed, conditional, optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level), netrc (delayed, conditional), getpass (delayed)
missing module named _dummy_threading - imported by dummy_threading (optional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)
missing module named Tkinter - imported by ttkthemes._tkinter (conditional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level), PIL.ImageTk (conditional)
missing module named ttk - imported by ttkthemes._tkinter (conditional), C:\Users\userid\AppData\Local\Programs\Python\Python36-32\Scripts\incparser21jun.py (top-level)