pyinstaller命令创建exe,但无法正常工作

时间:2019-06-23 21:27:29

标签: python-3.x tkinter exe pyinstaller

我尝试了很多组合,例如安装PyQt5,只是因为下面缺少PyQt4.QtCore,子进程,pickle等模块。

我也尝试路径到数据并导入隐藏线,但仍然会收到_tkinter错误作为警告。我不确定是否遗漏了任何东西。我检查了许多stackoverflow问题,并尝试了许多建议。可能我缺少了一些东西。一个帮助的方向将是巨大的。预先感谢!

Pyinstaller命令创建.exe

@IBOutlet weak var topMarginConstraint: NSLayoutConstraint!

override public func viewDidLoad() {
    if iphone4 {
        topMarginConstraint.constant = scrollView.frame.height / (orangeBoxView.height - iphone4TopMargin)
    } else if iphonex {
        topMarginConstraint.constant = scrollView.frame.height / (orangeBoxView.height - iphonexTopMargin)
    } else {
        // Implementations for other phones / screens...
    }
    view.setNeedsLayout()
}

规范文件:

pyinstaller --noconfirm --log-level=WARN --log-level=DEBUG --onedir --noconsole --noupx -i icon=parser.ico incparser21jun.spec incparser21jun.py

包含在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')

“构建”文件夹中的警告消息:

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

0 个答案:

没有答案