Help!?
$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyglet.gl import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.5/site-packages/pyglet/gl/__init__.py", line
507, in <module>
import pyglet.window
File "/Library/Python/2.5/site-packages/pyglet/window/__init__.py",
line 1667, in <module>
from pyglet.window.carbon import CarbonPlatform, CarbonWindow
File "/Library/Python/2.5/site-packages/pyglet/window/carbon/__init__.py",
line 69, in <module>
framework='/System/Library/Frameworks/QuickTime.framework')
File "/Library/Python/2.5/site-packages/pyglet/lib.py", line 90, in
load_library
return self.load_framework(kwargs['framework'])
File "/Library/Python/2.5/site-packages/pyglet/lib.py", line 226, in
load_framework
lib = ctypes.cdll.LoadLibrary(realpath)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py",
line 423, in LoadLibrary
return self._dlltype(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py",
line 345, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime,
6): no suitable image found. Did find:
/System/Library/Frameworks/QuickTime.framework/QuickTime: no matching
architecture in universal wrapper
/System/Library/Frameworks/QuickTime.framework/QuickTime: no matching
architecture in universal wrapper
I just updated to Snow Leopard, reinstalled pyglet, and my pyglet app
now fails on "from pyglet.gl import *" :-(
Help!?
I tried installing 1.1.3 from the tarball, but it didn't have any
effect (same error).
I tried checking out the pyglet trunk from the googlecode subversion
repository and installing it, but that also had no effect as far as I
can tell:
For a start, you're still loading pyglet from the Python/2.5
directory, not the local one you just downloaded. Perhaps you've got
a funny PYTHONHOME or PYTHONPATH set somewhere?
> OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime,
> 6): no suitable image found. Did find:
> /System/Library/Frameworks/QuickTime.framework/QuickTime: no matching
> architecture in universal wrapper
> /System/Library/Frameworks/QuickTime.framework/QuickTime: no matching
> architecture in universal wrapper
Here's the real problem though. Here's a session from Snow Leopard's
Python 2.6:
% /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import sizeof, c_voidp
>>> sizeof(c_voidp)
8
That's a 64-bit Python binary. pyglet won't work in 64-bits on OS X
(besides the QuickTime issue here, Carbon also is 32-bit only). While
waiting for someone with much free time to complete a Cocoa port of
pyglet, you can download a 32-bit Python from python.org.
Alex.
Bingo, I don't even remember setting it, but I have:
PYTHONPATH=/Library/Python/2.5/site-packages
>> OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime,
>> 6): no suitable image found. Did find:
>> /System/Library/Frameworks/QuickTime.framework/QuickTime: no matching
>> architecture in universal wrapper
>> /System/Library/Frameworks/QuickTime.framework/QuickTime: no matching
>> architecture in universal wrapper
>
> Here's the real problem though. Here's a session from Snow Leopard's
> Python 2.6:
>
> % /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
> Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from ctypes import sizeof, c_voidp
>>>> sizeof(c_voidp)
> 8
>
> That's a 64-bit Python binary. pyglet won't work in 64-bits on OS X
> (besides the QuickTime issue here, Carbon also is 32-bit only). While
> waiting for someone with much free time to complete a Cocoa port of
> pyglet, you can download a 32-bit Python from python.org.
>
> Alex.
Dang. I was rather happy that pyglet worked so well with the system
python before. So if I understand correctly, unless someone does a
whole lot of work to port pyglet<->Carbon interactions to be
pyglet<->Cocoa interactions, I'm stuck with needing to manually
install a 32-bit Python and use pyglet with that. Am I understanding
that correctly?
~ Nathan
No worries, I plan to keep breathing.
I went ahead and installed the Python binary installer from
python.org, and then reinstalled pyglet, and that seems to work.
Unfortunately my little app also uses Twisted, which I haven't yet
figured out how to get installed into the new 32-bit python (sigh).
I've moved over to the twisted mailing list for help getting twisted
working. Thanks! (Oh, and if anyone has tips for how to get twisted
to get installed into the correct place, I'd love to hear them)
~ Nathan