ImportError:“六个”软件包是必需的

时间:2019-01-29 15:07:52

标签: python user-interface tkinter cx-freeze

我正在尝试使用cx_Freeze将tkinter python脚本转换为exe。从现在开始,我处理了许多常见的问题,如TCL-TK,DLL和idna。看来我解决了它们,但现在又有另一个问题。当我尝试运行该应用程序的exe版本时,出现以下错误:

  

ImportError:需要'six'软件包;通常,它是与该软件包捆绑在一起的,因此,如果您收到此警告,请咨询您的发行商的软件包。

import cx_Freeze
import sys
import os.path
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl','tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')


base = None

if sys.platform == 'win32':
    base = 'Win32GUI'

executables = [cx_Freeze.Executable ("SeeWord.py", base=base)]

cx_Freeze.setup(name="SeeWord",
                options= {"build_exe": {"packages": ["idna", "tkinter", 
    "MySQLdb", "requests", 
    "bs4","re","random","win10toast","time","datetime","threading"] }},
                version="0.01",
                description="vocabulary application",
                executables = executables)

0 个答案:

没有答案