我有一个简单的代码,我试图进入一个。exe文件。该文件导入了tkinter和pandastable,并且还从名为list_of_games.csv的CSV文件导入。当我尝试运行create exe文件时,它只是打开命令提示符而不做任何其他操作。
我正在尝试使用.spec文件制作exe,其中包含以下隐藏的导入和数据(其他一切都保留为默认值):
datas=[('list_of_games.csv','.')],
hiddenimports=['pandas','pandastable','matplotlib.pyplot','os','sys'],
这里是有问题的代码,如果有什么我需要修复它使其工作:
from tkinter import *
from tkinter import font
from pandastable import Table, config
root = Tk()
root.geometry("1225x700+150+40")
root.title('Video Game Database')
frame = Frame(root, bg='light blue', bd=5)
frame.pack(fill='both', expand=True)
table = Table(frame, showtoolbar=True, showstatusbar=True)
table.autoResizeColumns()
options = config.load_options()
options = {'font': 'Calibri',
'fontsize': 11,
'rowselectedcolor': 'light green',
'colheadercolor': 'green'}
config.apply_options(options, table)
table.importCSV('list_of_games.csv')
table.redraw()
table.show()
root.mainloop()
任何人能提供的任何帮助都将非常感激,谢谢。
尝试添加新版auto - pto - exeAuto-Py-To-Exe
,然后从GitHub下载Zip文件
GitHub
然后使用该。Exe文件将您的。py文件转换为其Exe应用程序