I have written a simple app in python 3.7 using tkinter, which appears to compile fine in py2exe. When I try and run it I get the following error:
Here is the Error:
Traceback (most recent call last):
File "main.py", line 1, in <module>
File "tkinter\__init__.pyc", line 36, in <module>
File "<loader>", line 10, in <module>
File "<loader>", line 8, in __load
ImportError: (DLL load failed: %1 is not a valid Win32 application.) 'C:\\Users\\i30103\\PycharmProjects\\emailpars\\dist\\_tkinter.pyd'
Here is the code:
from tkinter import *
# Main Program
if __name__ == '__main__':
window = Tk()
window.title("Welcome to LikeGeeks app")
window.geometry('350x200')
lbl = Label(window, text="Hello")
lbl.grid(column=0, row=0)
def clicked():
lbl.configure(text="Button was clicked !!")
btn = Button(window, text="Click Me", command=clicked)
btn.grid(column=1, row=0)
window.mainloop()
Here is the setup file:
from distutils.core import setup
import py2exe
setup(console=['main.py'])
Here is information about the apps and my system
I'm running a Windows 10 computer with a 64bit os.
I am running python 3.7 32bit version. "Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32"
py2exe works fine without tkinter, but I am trying to make a GUI application. Any ideas?