[Pythonmac-SIG] distutils.errors.DistutilsFileError: file '/Library/Python/2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.pyc' does not exist
Lukáš 'Spike' Polívka
lukas.polivka at gmail.com
Thu Mar 27 09:43:04 CET 2008
On Thu, Mar 27, 2008 at 9:29 AM, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
> On 27 Mar, 2008, at 9:01, Lukáš 'Spike' Polívka wrote:
> > On Sun, Mar 9, 2008 at 2:48 AM, Nathan <nathan.stocks at gmail.com>
> > wrote:
> >> On Fri, Mar 7, 2008 at 10:03 PM, Lukáš 'Spike' Polívka
> >>
> >> <lukas.polivka at gmail.com> wrote:
> >>
> >>> No luck, for some reason. What path do you suggest I should put
> >>> there,
> >>> if QtCore.so is placed in
> >>> Jabbim.app/Contents/Resources/lib/python2.5/lib-dynload/PyQt4/?
> >>>
> >>> This is error log from Console:
> >>>
> >>> ImportError: '/System/Library/Frameworks/Python.framework/Versions/
> >>> 2.5/lib/python2.5/lib-dynload/PyQt4/QtCore.so'
> >>> not found
> >>
> >> Hmm. My missing stuff was pure python packages. I don't know if
> >> shared libraries are treated the same or not. If that were a python
> >> package, I would do
> >> sys.path.insert(0,'../Resources/lib/python2.5/lib-dynload/')
> >>
> >> ~ Nathan
> >>
> > So, in the end, Nathan was right. The following helped me:
> >
> > sys.path.insert(0, '../Resources/lib/python2.5/site-packages.zip') #
> > for Twisted
> > sys.path.insert(0, '../Resources/lib/python2.5/lib-dynload') # for
> > PyQt4
>
> That might help you, but leaves the bug in py2app. Phrased
> differently: this is a nice short-term hack, but it would be better
> py2app were changed to not require this hack. I'd really appreciate is
> some else could have a look at this, otherwise the issue will stay
> around until I get around fixing it which might take a while
> (especially because the bug for some reason doesn't affect me).
I agree it is only a hack. I'm afraid I am not able to fix py2app, though.
> > The first path is for my Twisted. The corresponding bundle-relative
> > path already was in sys.path, but after system-wide path.
> > The second path is for my PyQt4. No bundle-relative path was in
> > sys.path before, only system-wide (and wrong).
>
> The system-wide path should be there in the first place, maybe unless
> you run an alias bundle.
Well, then you run into problems if you need to bundle e.g. newer
library than the one provided with the system by default (which is the
case with Twisted, if I am not mistaken).
Also, the second path for PyQt4 didn't work as well, if it was only
appended to sys.path. I had to place it before the non-existent system
path.
> > Putting this to the main py (jabbim.py) seems like a mess to me,
> > though.
> >
> > Now… my next problem is that apparently Qt4 is bundled without
> > libjpeg. I have installed Trolls' official qt dmg (no compiling on my
> > part). Outside of the bundle, Jabbim works OK, but when run from the
> > bundle, JPEGs don't work. Any remedy on that?
> >
> >
> > As a side note, setuptools==dev breaks py2app==dev, if anybody cares
> > to know.
>
> I care. Could you elaborate, or even better provide a patch ;-)
$ sudo easy_install -U setuptools==dev
Installed /Library/Python/2.5/site-packages/setuptools-0.7a1dev_r61341-py2.5.egg
$ sudo easy_install -U py2app==dev
Installed /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg
$ export PYTHONPATH=/Library/Python/2.5/site-packages
$ python setup.py py2app
running py2app
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 579, in _run
self.run_normal()
File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 631, in run_normal
mf = self.get_modulefinder()
File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 539, in get_modulefinder
debug=debug,
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/find_modules.py",
line 255, in find_modules
find_needed_modules(mf, scripts, includes, packages)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/find_modules.py",
line 176, in find_needed_modules
mf.run_script(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 369, in run_script
self.scan_code(co, m)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 638, in scan_code
self.scan_code(c, m)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 610, in scan_code
self._safe_import_hook(name, m, fromlist)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 540, in _safe_import_hook
mods = self.import_hook(name, caller)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 380, in import_hook
q, tail = self.find_head_package(parent, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 419, in find_head_package
q = self.import_module(head, qname, parent)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 493, in import_module
parent and parent.packagepath, parent)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 680, in find_module
fp, buf, stuff = find_module(name, path)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py",
line 114, in find_module
if isinstance(importer, pkg_resources.ImpWrapper):
AttributeError: 'module' object has no attribute 'ImpWrapper'
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/modulegraph/modulegraph.py(114)find_module()
-> if isinstance(importer, pkg_resources.ImpWrapper):
(Pdb)
No patch, sorry. :)
Lukáš
--
IM (XMPP/Jabber/Google Talk): spike411 at jabber.cz
ICQ, AIM, MSN: Never ever!
More information about the Pythonmac-SIG
mailing list