using pyinstaller to distribute wxPython app in linux

Hi,

I am using Linux (centOS) and am trying to make a executeable of my

python script that has a GUI made with wx. Im using python2.4 and

wxpython 2.8 and pyinstaller 1.3

This is what my python script looks like from the point of imports:

import sys, os

import re

if sys.platform.startswith(“win”): #win32, linux2, darwin (osx)

try:

   import win32api

except Exception:

   pass

elif sys.platform.startswith(“linux”):

en = ‘’

if os.environ.has_key(“LD_LIBRARY_PATH”):

   en = os.environ["LD_LIBRARY_PATH"]

   if len(en) > 0:

       en+=";"

en+=""
os.environ[“LD_LIBRARY_PATH”] = en
import wx
import wx.lib.scrolledpanel as scrolled
import wx.lib.hyperlink as hl
and this is the command I use to make the .spec file:
/usr/bin/python2.4 Makespec.py myscript.py
and this is the command I use to build:
/usr/bin/python2.4 Build.py myscript/myscript.spec
it compiles fine on the computer i use to make it, but when I run it
on another similar linux machine that has python 2.4 but not wx, this
error occurs:
Traceback (most recent call last):
File “”, line 22, in ?
File “/pyinstaller-1.3/iu.py”, line 312, in importHook
mod = _self_doimport(nm, ctx, fqname)
File “/pyinstaller-1.3/iu.py”, line 398, in doimport
exec co in mod.dict
File “myscript/buildmyscript/out1.pyz/wx”, line 45, in ?
File “/pyinstaller-1.3/iu.py”, line 312, in importHook
mod = _self_doimport(nm, ctx, fqname)
File “/pyinstaller-1.3/iu.py”, line 398, in doimport
exec co in mod.dict
File “myscript/buildmyscript/out1.pyz/wx._core”, line 4, in ?
File “/pyinstaller-1.3/iu.py”, line 312, in importHook
mod = _self_doimport(nm, ctx, fqname)
File “/pyinstaller-1.3/iu.py”, line 373, in doimport
mod = importfunc(nm)
File “/pyinstaller-1.3/iu.py”, line 215, in getmod
mod = owner.getmod(nm)
File “/pyinstaller-1.3/archive.py”, line 409, in getmod
return iu.DirOwner.getmod(self, self.prefix+’.’+nm)
File “/pyinstaller-1.3/iu.py”, line 77, in getmod
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
ImportError: libwx_gtk2ud_aui-2.8.so.0: cannot open shared object
file: No such file or directory
I’m not sure what Im doing wrong, but I’ve tried to compile without
the LD_PATHS in my script and it still fails the same way. Any ideas?
I’ve had a look around and google doesn’t help.
Any advice?
Cheers

···

usr/lib/wxPython/lib//

-- "Formulations of number theory: Complete, Consistent, Non-trivial. Choose two." -David Morgan-Mar


Please think of the environment before printing this email.

This email and any attachments may be confidential and/or privileged.
If you are not the intended recipient of this email, you must not disclose or use the information
contained in it.
Please notify the sender immediately and delete this document if you have received it in error.
We do not guarantee this email is error or virus free.