Bob Ippolito wrote: > On 9/28/06, Michael Glassford <[EMAIL PROTECTED]> wrote: >> Bob Ippolito wrote: >>> On 9/28/06, Michael Glassford <[EMAIL PROTECTED]> wrote: >>>> Bob Ippolito wrote: >>>>> On 9/28/06, Michael Glassford <[EMAIL PROTECTED]> wrote: >>>>>> Bob Ippolito wrote: >>>>>>> On 9/28/06, Michael Glassford <[EMAIL PROTECTED]> wrote: >>>>>>>> I've just installed Python 2.5, then installed py2app and pyobjc >>>> using >>>>>>>> easy_install. My application built just fine, but when I run it >>>> I get >>>>>>>> the error "ImportError: No module named PyObjCTools" when it >>>> tries to >>>>>>>> execute the line "from PyObjCTools import AppHelper". How does >>>>>>>> PyObjCTools get installed when easy_installing pyobjc? >>>>>>> You are probably using easy_install frrom a different version of >>>> Python. >>>>>>> -bob >>>>>>> _______________________________________________ >>>>>>> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >>>>>>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>>>>>> >>>>>> If I understand what you mean correctly, which is that I'm running >>>> the >>>>>> easy_install that's in my Python2.4 installation so it's installing >>>>>> py2app and pyobjc in my Python2.4 directories, I don't think so: >>>>>> >>>>>> 1) My PATH looks like this: >>>>>> >>>> "/Library/Frameworks/Python.framework/Versions/2.5/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin". >>>> >>>>>> The correct version of easy_install is in the first directory >>>> in the >>>>>> PATH. >>>>>> >>>>>> 2) If I use "easy_install-2.5 py2app" and "easy_install-2.5 py2objc"I >>>>>> get the same result. >>>>>> >>>>>> >>>>>> Here's the output when I run the two commands, in case anything >>>> stands >>>>>> out to you: >>>>>> >>>>>> >>>>>> >>>>>> Computer:/users/build/develop/ build$ sudo easy_install py2app >>>>>> Password: >>>>>> Searching for py2app >>>>>> Best match: py2app 0.3.4 >>>>>> Processing py2app-0.3.4-py2.5.egg >>>>>> py2app 0.3.4 is already the active version in easy-install.pth >>>>>> Installing py2applet script to >>>>>> /Library/Frameworks/Python.framework/Versions/2.5/bin >>>>>> >>>>>> Using >>>>>> >>>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.4-py2.5.egg >>>> >>>>>> Processing dependencies for py2app >>>>>> >>>>>> >>>>>> >>>>>> Computer:/users/build/develop/ build$ sudo easy_install pyobjc >>>>>> Searching for pyobjc >>>>>> Best match: pyobjc 1.4 >>>>>> Processing pyobjc-1.4-py2.5-macosx-10.3-fat.egg >>>>>> pyobjc 1.4 is already the active version in easy-install.pth >>>>>> Installing nibclassbuilder script to >>>>>> /Library/Frameworks/Python.framework/Versions/2.5/bin >>>>>> >>>>>> Using >>>>>> >>>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyobjc-1.4-py2.5-macosx-10.3-fat.egg >>>> >>>>>> Processing dependencies for pyobjc >>>>>> >>>>> I don't know then, it works fine with Python 2.4. Ronald? >>>>> >>>>> -bob >>>>> _______________________________________________ >>>>> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >>>>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>>>> >>>> Here's a clue: I looked in >>>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ >>>> >>>> and noticed that while some of the eggs were unzipped (i.e. they were >>>> directories), pyobjc-1.4-py2.5-macosx-10.3-fat.egg was not (i.e. it was >>>> a file). I manually unzipped it to see if it contained PyObjCTools and >>>> it did. Then I replaced the "pyobjc-1.4-py2.5-macosx-10.3-fat.egg" file >>>> with the "pyobjc-1.4-py2.5-macosx-10.3-fat.egg" directory and tried >>>> again. It worked. >>>> >>>> After a bit of further investigation, the problem appears to be that >>>> py2app isn't correctly finding stuff that's in a zipped egg file, so >>>> that stuff is never being included in the py2app application's >>>> site-packages.zip file. Should it? Or should the eggs all be unzipped >>>> when they're installed? Maybe I have the wrong version of something? >>> py2app is not compatible with zipped eggs at this time. >>> >>> -bob >>> >> OK. Couldn't the PyObjC egg be set to unzip by default, then? Or could >> py2app display a warning if there are zipped eggs (or at the very least >> if the PyObjC egg is zipped)? > > Making the egg unzip by default is easy, but using "easy_install -Z > pyobjc" is a workaround until that happens (you may need to delete the > current egg).
Yes, thanks, it wasn't hard to figure this out once I knew what the problem was. > Changing py2app is not so easy... or rather, the effort that goes into > determining that a zip is required is nearly the same as the effort > required to support zipped eggs, so it would be silly to display a > warning instead of creating a working app. That makes sense, thanks. Mike _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig