Re: pyobjc 2.3 install fails
Ronald Oussoren <[email protected]>
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
On 9 Dec, 2010, at 17:09, Mark Sienkiewicz wrote:
> Thanks for the clarification on those un-important errors.
>
>>>>>> import pyobjc
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> ImportError: No module named pyobjc
>> That's expected. Use 'import objc' instead.
>
> Oh - sorry. (I'm not the user of this package; I just install things.)
No need to apologize.
>
>
>> You seem the end up with a complete installation. Does 'import Foundation' or 'import AppKit' work?
>
> I get this now from pyobjc 2.3:
>
>>>> import objc
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg/objc/__init__.py", line 24, in <module>
> _update()
> File "/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg/objc/__init__.py", line 21, in _update
> import objc._objc as _objc
> ImportError: dlopen(/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg/objc/_objc.so, 2): Symbol not found: _PyMac_Error
> Referenced from: /Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg/objc/_objc.so
> Expected in: dynamic lookup
>
> Foundation and AppKit both start to import, but they get this same exception when they try to import objc.
That's one error I hadn't expected. Which python do you use? Are you using a prebuilt binary from the python.org website or something else?
What's the output of this code:
:>>> import sysconfig
:>>> print sysconfig.get_config_var('USE_TOOLBOX_OBJECT_GLUE')
I'd expect that this prints None on your system, which is a configuration I haven't tested in a long while.
>
> With pyobjc 2.2 it is a different symbol:
>
>>>> import objc
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_core-2.2-py2.7-macosx-10.4-i386.egg/objc/__init__.py", line 22, in <module>
> _update()
> File "/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_core-2.2-py2.7-macosx-10.4-i386.egg/objc/__init__.py", line 19, in _update
> import _objc
> ImportError: dlopen(/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_core-2.2-py2.7-macosx-10.4-i386.egg/objc/_objc.so, 2): Symbol not found: _CFMutableArrayRefObj_New
> Referenced from: /Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_core-2.2-py2.7-macosx-10.4-i386.egg/objc/_objc.so
> Expected in: dynamic lookup
>
>
> Normally, I would go hunting for the references to the missing symbols and I would look for where they came from, but as far as I can tell, easy_install does not leave any source code behind. Is there a normal source distribution I can download, so I can see what the code does?
>
> ( Actually, that hints at my next question: Is it possible to install pyobjc from a local copy of the software -- e.g. while not connected to the internet? Eventually, I have to take this to systems with more strict configuration control. )
There are source archives for all bits of pyobjc on PyPI. I don't have an archive with all of PyObjC at this time.
The setup.py file for 'pyobjc' itself contains a list of subprojects, if you install the source archives for the subprojects in the order they are listed there you should be able to install without an internet connection.
Ronald
>
> Mark
>
------------------------------------------------------------------------------
_______________________________________________
Pyobjc-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
smime.p7s
(application/pkcs7-signature, 2.2 KB) - not displayed