【发布时间】:2020-07-14 14:20:21
【问题描述】:
我想冻结我的程序,但是当我这样做并启动 .exe 时,我收到以下消息
No module named 'ttkwidgets'
这里是安装文件
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
options = {
'build_exe': {
'includes': 'atexit'
}
}
executables = [
Executable('BouclePrincipale.py', base="Win32GUI")
]
setup(name='simple_Tkinter',
version='0.1',
description='Sample cx_Freeze Tkinter script',
executables=executables
)
【问题讨论】:
-
你试过用pip安装ttkwidgets吗?
-
我使用 pip 安装,因为程序在冻结之前可以正常运行
-
你自己安装了 tkinter 模块吗?
-
我认为是的,tkinter 默认不包含在 python 中?
-
据我所知。试试“pip install tkinter”看看能不能解决。
标签: python cx-freeze ttkwidgets