pyglet requires PyObjC when run in 64-bit Python; import objc failed

58 views
Skip to first unread message

Winston Wolff

unread,
Jun 22, 2012, 3:05:00 PM6/22/12
to pyglet...@googlegroups.com
I'm trying to run Pyglet tests from this commit: cd9b3e19ed7b, on Mac OS X 10.7.4

I get the error message below. That's confusing me, since wasn't Phillip's cocoa work supposed to eliminate the need to use PyObjC?

-ww

% python test.py image
Traceback (most recent call last):
File "test.py", line 257, in <module>
import tests.regression
File "../tests/regression/__init__.py", line 11, in <module>
from pyglet.image import get_buffer_manager
File "../pyglet/__init__.py", line 210, in <module>
_choose_darwin_platform() # can be overridden by an environment variable below
File "../pyglet/__init__.py", line 204, in _choose_darwin_platform
raise Exception('pyglet requires PyObjC when run in 64-bit Python; import objc failed')
Exception: pyglet requires PyObjC when run in 64-bit Python; import objc failed

Bruce Smith

unread,
Jun 22, 2012, 3:18:00 PM6/22/12
to pyglet...@googlegroups.com
I would guess that is just an import verification (designed to produce a clear error message as early as possible, if import objc is going to fail later), which is no longer needed now that the real import is eliminated. (I guess this since I was involved in modifying that code.) If I'm right then you can just remove this import verification, provided that whatever "choice" still needs to be made by _choose_darwin_platform (if any) is still made correctly.

- Bruce Smith


--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.


Phillip Nguyen

unread,
Jun 22, 2012, 6:24:12 PM6/22/12
to pyglet...@googlegroups.com
The patch from Txema Vicente that you just applied reverted part of pyglet/__init__.py back to the old pyobjc-based code.  I'll just change it back in the one file, since the rest of the patch seemed okay.

--phillip

Winston Wolff

unread,
Jun 22, 2012, 6:27:09 PM6/22/12
to pyglet...@googlegroups.com
Phillip-

Thanks. Txema just emailed me to say the same thing.

-ww
> --
> You received this message because you are subscribed to the Google Groups "pyglet-users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/wzkfFV2UemsJ.
Reply all
Reply to author
Forward
0 new messages