pyinstaller: create executable from monolitic script

Hi all.

I have an application that I would put online. I wish to begin create an executable with pyinstaller.

Considering that my application has many script, the idea of creating many executable it makes me mad.

So I thought it would be enough to create a single python script

monolithic includes all script and then create the executable from script

monolithic with pyinstaller.

Someone has already tried if it can work?

···


Fabio Spadaro
www.fabiospadaro.com

That would make me mad, too. But, fortunately, I think it should just
take your main application file and then finds all the necessary other
modules you import. That's how it works with py2exe and InnoSetup.
Have you tried it yet?

Che

···

On Wed, Jan 12, 2011 at 3:27 PM, Fabio Spadaro <fabiolinospad@gmail.com> wrote:

Hi all.
I have an application that I would put online. I wish to begin create an
executable with pyinstaller.
Considering that my application has many script, the idea of creating many
executable it makes me mad.

Hi.

···

2011/1/12 C M cmpython@gmail.com

On Wed, Jan 12, 2011 at 3:27 PM, Fabio Spadaro fabiolinospad@gmail.com wrote:

Hi all.

I have an application that I would put online. I wish to begin create an

executable with pyinstaller.

Considering that my application has many script, the idea of creating many

executable it makes me mad.

That would make me mad, too. But, fortunately, I think it should just

take your main application file and then finds all the necessary other

modules you import. That’s how it works with py2exe and InnoSetup.

Have you tried it yet?

Che

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

I work on Linux. The best solution is pyinstaller, cx_freeze or what?


Fabio Spadaro
www.fabiospadaro.com

Fabio Spadaro wrote:

I work on Linux. The best solution is pyinstaller, cx_freeze or what?

Most Linux distributions include Python. Is there a reason you can't
just install the scripts? When you create an executable, each
executable contains a copy of the Python interpreter. That gets big
rather quickly.

You could consider doing things the way the source control scheme do
(cvs, hg, git, and so on), where you have one executable with a second
command to identify exactly what action to take.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

As an experiment I just created the executable only on the main.py script and let the other

with. py. I tried to run the main.exe but it gives me this error:

Traceback (most recent call last):

File “”, line 14, in

File “/ home/fabio/Scrivania/python/pyinstaller-1.5-rc1/iu.py”, line 477, in

importHook

self.doimport = mod (nm, ctx, ctx +’.’+ nm)

File “/ home/fabio/Scrivania/python/pyinstaller-1.5-rc1/iu.py”, line 521, in

doimport

exec co in mod.dict

File “. / core / core.py”, line 4, in

import anydbm

File “/ home/fabio/Scrivania/python/pyinstaller-1.5-rc1/iu.py”, line 455, in

importHook

raise ImportError, “No module named% s”% fqname

ImportError: No module named anydbm

Why does the module gives an error about importing anydbm while there is no error for the import module os, wx

Core.py

import os

import wx

import anydbm

import sys

···


Fabio Spadaro
www.fabiospadaro.com

I imagine that PyInstaller has the same troubles as all the other similar tools with accurately determining which modules to include in the bundle. There should be a way for you to request that a specific module be included even if PyInstaller doesn't think it needs to do it. Check the PyInstaller docs.

···

On 1/12/11 2:21 PM, Fabio Spadaro wrote:

As an experiment I just created the executable only on the main.py
script and let the other
with. py. I tried to run the main.exe but it gives me this error:

ImportError: No module named anydbm

Why does the module gives an error about importing anydbm while there is
no error for the import module os, wx

--
Robin Dunn
Software Craftsman

See http://www.blog.pythonlibrary.org/2010/08/10/a-pyinstaller-tutorial-build-a-binary-series/

Looks like you need to add the path in the pathex parameter of the
Analysis class.

···

On Jan 13, 12:05 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 1/12/11 2:21 PM, Fabio Spadaro wrote:

> As an experiment I just created the executable only on the main.py
> script and let the other
> with. py. I tried to run the main.exe but it gives me this error:
> ImportError: No module named anydbm

> Why does the module gives an error about importing anydbm while there is
> no error for the import module os, wx

I imagine that PyInstaller has the same troubles as all the other
similar tools with accurately determining which modules to include in
the bundle. There should be a way for you to request that a specific
module be included even if PyInstaller doesn't think it needs to do it.
Check the PyInstaller docs.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Mike, this looks like a great tutorial! It mentions "the same lame
wxPython script from the last article", but I found no link or an
obvious way to find that last article. Would you add one to that
page ?

Thanks,
Ray

···

On Jan 13, 2:17 pm, Mike Driscoll <kyoso...@gmail.com> wrote:

...

See http://www.blog.pythonlibrary.org/2010/08/10/a-pyinstaller-tutorial-b

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Hi Fabio,

I work on Linux. The best solution is pyinstaller, cx_freeze or what?

I think the best solution (not necessarily the easiest one) is to
create packages in the native format of your target Linux platform.
That means debian packages (.deb) for Debian and Ubuntu, RPM's for
Fedora, OpenSuse, etc. That's what we do for Task Coach
(http://taskcoach.org). Feel free to browse the sources at
Task Coach download | SourceForge.net
(start at the Makefile and look at make.py, and the support files in
the build.in folder).

Cheers, Frank

···

2011/1/12 Fabio Spadaro <fabiolinospad@gmail.com>:

Hmm, yeah I guess that would make more sense. I added the link to the article. Here it is for the archives too:

http://www.blog.pythonlibrary.org/2010/07/31/a-py2exe-tutorial-build-a-binary-series/

Thanks,

···

On Fri, Jan 14, 2011 at 4:16 PM, Ray Pasco pascor22234@gmail.com wrote:

On Jan 13, 2:17 pm, Mike Driscoll kyoso...@gmail.com wrote:

See http://www.blog.pythonlibrary.org/2010/08/10/a-pyinstaller-tutorial-b.


Mike Driscoll

Blog: http://blog.pythonlibrary.org

Mike, this looks like a great tutorial! It mentions "the same lame

wxPython script from the last article", but I found no link or an

obvious way to find that last article. Would you add one to that

page ?

Thanks,

Ray

Mike Driscoll

Blog: http://blog.pythonlibrary.org