Grrr... Can't make a single file executable

Grrr... With so many programs that supposedly make a single file executable out of a Python program, you'd think at least one of them would work.

1) GUI2exe - It just crashes just by trying to create a new project. It doesn't even get as far as *trying* to make an executable.

2) PyInstaller - It makes an executable which simply segfaults.

3) cx_Freeze - It dies trying to make the executable (see appendix A).

4) bbFreeze - Also dies trying to make the executable (see appendix B).

:frowning:

Maybe these programs just don't support Linux well. But if that's the case, I can't use them. I develop in Linux and I'm not going to make my program Windows-only. The whole *point* of wxPython is to be cross platform.

Daniel.

APPENDIX A: Trying to run cx_Freeze

···

-----------------------------------

% ./cxfreeze wx_Wordlibro.py --target-dir dist
Traceback (most recent call last):
   File "./cxfreeze", line 5, in <module>
     main()
   File "/home/daniel/Projects/Monda/Wordlibro/Python/cx_Freeze-4.1.1/cx_Freeze/main.py", line 187, in main
     silent = options.silent)
   File "/home/daniel/Projects/Monda/Wordlibro/Python/cx_Freeze-4.1.1/cx_Freeze/freezer.py", line 88, in __init__
     self._VerifyConfiguration()
   File "/home/daniel/Projects/Monda/Wordlibro/Python/cx_Freeze-4.1.1/cx_Freeze/freezer.py", line 336, in _VerifyConfiguration
     self._GetInitScriptFileName()
   File "/home/daniel/Projects/Monda/Wordlibro/Python/cx_Freeze-4.1.1/cx_Freeze/freezer.py", line 251, in _GetInitScriptFileName
     raise ConfigError("no initscript named %s", name)
cx_Freeze.freezer.ConfigError: no initscript named Console

APPENDIX B: Trying to run bbFreeze
----------------------------------

% ./bb-freeze wx_Wordlibro.py
Traceback (most recent call last):
   File "./bb-freeze", line 4, in <module>
     from bbfreeze import main
   File "/home/daniel/Projects/Monda/Wordlibro/Python/bbfreeze/bbfreeze/__init__.py", line 8, in <module>
     from bbfreeze.freezer import Freezer
   File "/home/daniel/Projects/Monda/Wordlibro/Python/bbfreeze/bbfreeze/freezer.py", line 11, in <module>
     from modulegraph import modulegraph
   File "/home/daniel/Projects/Monda/Wordlibro/Python/bbfreeze/bbfreeze/modulegraph/modulegraph.py", line 9, in <module>
     require("altgraph")
   File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 626, in require
     needed = self.resolve(parse_requirements(requirements))
   File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 524, in resolve
     raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: altgraph

Daniel,

Daniel Carrera wrote:

Grrr... With so many programs that supposedly make a single file executable out of a Python program, you'd think at least one of them would work.

1) GUI2exe - It just crashes just by trying to create a new project. It doesn't even get as far as *trying* to make an executable.

2) PyInstaller - It makes an executable which simply segfaults.

3) cx_Freeze - It dies trying to make the executable (see appendix A).

4) bbFreeze - Also dies trying to make the executable (see appendix B).

You might want to post on the respective forums.

Are you using the latest versions? I am aware that cx_Freeze issued new versions in December and another one just a few days ago. Anthony was very fast in coming back on issues when I tried it - also I am still using py2exe.

Werner

werner wrote:

Are you using the latest versions? I am aware that cx_Freeze issued new versions in December and another one just a few days ago. Anthony was very fast in coming back on issues when I tried it - also I am still using py2exe.

I'm not downloading from SVN, but I have the latest stable versions from the website, downloaded today.

If it produces a core file then loading that in gdb and doing a backtrace may give some clues.

···

On 1/18/10 2:11 AM, Daniel Carrera wrote:

Grrr... With so many programs that supposedly make a single file
executable out of a Python program, you'd think at least one of them
would work.

1) GUI2exe - It just crashes just by trying to create a new project. It
doesn't even get as far as *trying* to make an executable.

2) PyInstaller - It makes an executable which simply segfaults.

--
Robin Dunn
Software Craftsman

Grrr... With so many programs that supposedly make a single file executable
out of a Python program, you'd think at least one of them would work.

I think they all work if everything is set up right, latest versions
are used, etc.

1) GUI2exe - It just crashes just by trying to create a new project. It
doesn't even get as far as *trying* to make an executable.

I had not tried it on Linux until just now and found that it crashed
while opening. But then I checked out the newest version from SVN and
now it doesn't crash and seems to be fine (though I didn't test it
thoroughly). I know you've mentioned a deep conviction against using
SVN , but if you happen to "accidentally" paste these two lines into
the command line in Linux, you'll get the latest version of GUI2Exe:

sudo apt-get install subversion
(then type "Y" and hit enter when asked. After it does its thing, then type...)

svn checkout http://gui2exe.googlecode.com/svn/trunk/ gui2exe-read-only

Then you'll find the folder in your home directory, gui2exe-read-only.
In there, click on GUI2Exe.py. See if it works then.

Maybe these programs just don't support Linux well. But if that's the case,
I can't use them. I develop in Linux and I'm not going to make my program
Windows-only. The whole *point* of wxPython is to be cross platform.

Clearly, wxPython apps are made cross-platform all the time, so that
oughtn't be a worry. I'm intrigued by this line from the cx_freeze
site: "Unlike these two tools [py2exe and pyapp], cx_Freeze is cross
platform and should work on any platform that Python itself works on."
I'll have to check that out more.

Che

···

On Mon, Jan 18, 2010 at 5:11 AM, Daniel Carrera <dcarrera@gmail.com> wrote: