I want to create an executable .exe file from my python script. I have tried many tutorials and ways explained on the web to do this. I have tried py2exe pyInstaller but I couldnt create a working executable file. I'm using Enthought Canopy as my programming environment. The modules imported in the code are as follows:
import Tkinter as tk
from Tkinter import Text
from PIL import ImageTk, Image
import pyttsx
import pickle
I'm using an object from a file that I have created by pickle so I need them too. Lets say I have 2 files named a.fil b.fil
When I run the .exe file it instantly show a command prompt and closes it directly.
Traceback (most recent call last):
File "code.py", line 4 in <module>
File "Tkinter.pyc", line 38 in <module>
File "FixTk.pyc", line 65 in <module>
File "_tkinter.pyc", line 12 in <module>
File "_tkinter.pyc", line 10 in _load
Import Error: DLL load failed : %1 is not a valid win32 application
There's only py2exe. Just read the manual. py2exe will never copy all DLLs because it's illegal since the window stuff is the Intellectual Property of Microsoft and copying it violates the copyright law. If you need DLLs copy them yourself. If you don't know which ones use Dependency Walker.