I was wondering if anyone has any success in creating a stand alone executable using pyinstaller with a script that has enthought imports. I have been trying to do this for a couple of days now, however I keep getting an import error. Through some digging around I believe that I might need to add some hidden import and create my own hooks. However I have not heard of anyone having any success with this, so I thought I would ask here and see if anyone might have some experience with this situation.
Asked
Active
Viewed 1,203 times
3
-
2I have not used PyInstaller, but I have used py2exe to package ETS GUI apps. You will almost certainly need to use `--onedir --hidden-import=traitsui.qt4 --hidden-import=pyface.ui.qt4` (replace `qt4` with `wx` if you are using wxPython). – Robert Kern Mar 06 '13 at 16:19
-
Do you think you could provide me with the setup script you used to package ETS with py2exe. I would like to work with an example if possible. – user1750948 Mar 08 '13 at 13:58
-
I'm sorry, but that was proprietary work for a client. – Robert Kern Mar 12 '13 at 10:37
-
If you want to try out py2exe, Thomas Lecocq has a post that walks you through a [simple example](http://www.geophysique.be/2011/08/01/pack-an-enthought-traits-app-inside-a-exe-using-py2exe-ets-4-0-edit/) – jonathanrocher Mar 22 '13 at 15:24
1 Answers
0
I had been trying to build a stand alone exe of my python app which uses matplotlib (one of the components of enthought) and was having lots of trouble getting it to work. Finally found a bug post (http://www.pyinstaller.org/ticket/651) on pyinstaller site that told me that it was a bug in pyinstaller. I followed the reference in that post to download the fixed version of pyinstaller at https://github.com/pyinstaller/pyinstaller/pull/61
Now my build to stand alone exe works fine. I bet you were experiencing the same problem as me. see... Building python pylab/matplotlib exe using pyinstaller