[Pythonmac-SIG] py2app and .so files

Ned Deily nad at acm.org
Fri Mar 4 20:12:29 CET 2011


In article 
<AANLkTimTQwMsKAp4kqR_By4SB4YNYX2kpHJT6XPuth=M at mail.gmail.com>,
 André Sintzoff <andre.sintzoff at gmail.com> wrote:

> 2011/3/4 Aahz <aahz at pythoncraft.com>:
> > On Fri, Mar 04, 2011, Andr? Sintzoff wrote:
> >>
> >> The application is created with:
> >> $ python setup.py py2app --use-pythonpath
> >>
> >> Unfortunately, when
> >> $ open ./dist/TortoiseHg.app/Contents/MacOS/TortoiseHg
> >> the following message is displayed
> >> ImportError: 
> >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib
> >> -dynload/mercurial/osutil.so'
> >> not found
> >>
> >> I'm wondering why the application searches modules in
> >> /System/Library/Frameworks/Python.framework and not in the bundle just
> >> created where the files are available.
> >
> > You need to download from python.org; using the built-in Python causes
> > py2app to behave differently.
> 
> I just tried to install MacPython
> (http://pythonmac.org/packages/py25-fat/dmg/python-2.5-macosx.dmg)

Is there a reason you need to use a very out-of-date Python 2.5?   More 
recent released installers are available here:

http://python.org/download/

For maximum compatibility, stick to one of the 32-bit-only 10.3+ 
installers, say, for python2.7.
 
> Unfortunately, I have some issues regarding paths...
> I got the following import error when launching my application:
> ImportError: No module named PyQt4.uic.Compiler
> 
> I'm afraid to have done something modifying sys.path but I don't see what.

After installing the new Python, you'll need to install a copy of 
easy_install for it (either setuptools or Distribute) and then 
re-install any other 3rd-part packages that you need, like py2app and 
PyQt.

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list