[Pythonmac-SIG] py2app and setuptools , import error (osx 10.6.3, system python)

Massimo Di Stefano massimodisasha at gmail.com
Sat Jun 12 17:15:02 CEST 2010


Seems Py2app search a .so in the wrong place 

can this log help ? :

MacBook-Pro-15-di-Massimo-Di-Stefano:PyObjCExample-ImageBrowser sasha$ ./dist/ImageBrowser.app/Contents/MacOS/ImageBrowser 
Traceback (most recent call last):
  File "/Users/sasha/Downloads/PyObjCExample-ImageBrowser/dist/ImageBrowser.app/Contents/Resources/__boot__.py", line 31, in <module>
    _run('main.py')
  File "/Users/sasha/Downloads/PyObjCExample-ImageBrowser/dist/ImageBrowser.app/Contents/Resources/__boot__.py", line 28, in _run
    execfile(path, globals(), globals())
  File "/Users/sasha/Downloads/PyObjCExample-ImageBrowser/dist/ImageBrowser.app/Contents/Resources/main.py", line 1, in <module>
    from PyObjCTools import NibClassBuilder, AppHelper
  File "build/bdist.macosx-10.6-universal/egg/PyObjCTools/NibClassBuilder.py", line 70, in <module>
  File "objc/__init__.pyc", line 22, in <module>
  File "objc/__init__.pyc", line 19, in _update
  File "objc/_objc.pyc", line 18, in <module>
  File "objc/_objc.pyc", line 15, in __load
ImportError: '/usr/lib/python2.6/lib-dynload/objc/_objc.so' not found
2010-06-12 16:50:42.809 ImageBrowser[36677:903] ImageBrowser Error
2010-06-12 16:50:42.814 ImageBrowser[36677:903] ImageBrowser Error
An unexpected error has occurred during execution of the main script

ImportError: '/usr/lib/python2.6/lib-dynload/objc/_objc.so' not found
MacBook-Pro-15-di-Massimo-Di-Stefano:PyObjCExample-ImageBrowser sasha$ open /usr/lib/python2.6/lib-dynload/objc/
The file /usr/lib/python2.6/lib-dynload/objc does not exist.
MacBook-Pro-15-di-Massimo-Di-Stefano:~ sasha$ sudo /usr/libexec/locate.updatedb
MacBook-Pro-15-di-Massimo-Di-Stefano:~ sasha$ locate _objc.so
/Applications/Utilities/AutodeskUninstaller/Autodesk Uninstaller.app/Contents/Resources/Python/lib-dynload/objc/_objc.so
/Applications/Utilities/AutodeskUninstaller/RegisterPkg.app/Contents/Resources/Python/lib-dynload/objc/_objc.so
/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.6-universal.egg/objc/_objc.so
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC/objc/_objc.so
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/objc/_objc.so




Il giorno 12/giu/2010, alle ore 16.03, Ronald Oussoren ha scritto:

> 
> On 12 Jun, 2010, at 4:13, Massimo Di Stefano wrote:
>> 
>> 
>> but if i try to run the example from PyObjc : 
>> 
>> PyObjCExample-ImageBrowser
>> 
>> i have this log :
>> 
>> PyObjCExample-ImageBrowser sasha$ python main.py 
>> /Library/Python/2.6/site-packages/pyobjc_framework_Cocoa-2.2-py2.6-macosx-10.6-universal.egg/PyObjCTools/NibClassBuilder.py:73: DeprecationWarning: PyObjCTools.NibClassBuilder is deprecated, use explicit definitions instead
>> 2010-06-12 13:10:41.997 Python[18759:d07] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting
>> 
>> 
>> 
>> any clue on what i'm doing wrong, how can i run this example?
> 
> You must use py2app to create an application bundle and then run that. Almost all pyobjc examples are GUI ones that require being run in a bundle.
> 
> Ronald
>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100612/c8591482/attachment-0001.html>


More information about the Pythonmac-SIG mailing list