Search code examples
pythonpandastkinterpyinstallerexe

Having trouble making a working exe using Pyinstaller for my file


I have a simple code that I'm trying to make into an .exe file. The file has tkinter and pandastable imported, and also imports from a CSV file called list_of_games.csv. When I try to run the create exe file, it simply opens command prompt and does nothing else.

I am attempting to make the exe using a .spec file, with the following hiddenimports and datas (everything else was left as default):

datas=[('list_of_games.csv','.')],  
hiddenimports=['pandas','pandastable','matplotlib.pyplot','os','sys'],  

Here is the code in question, if there's anything I need to fix in it to make it work:

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()  

Any help anyone can offer would be greatly appreciated, thanks.


Solution

  • Try Adding the New Verson Of Auto-Py-To-Exe Auto-Py-To-Exe

    and then download the Zip file from GitHub

    GitHub

    Then Use That .exe File To Convert your .Py File To Its Exe Application