I'm failing to install properly on OSX Snow Leopard, Python 3.2 32/64-bit
.dmg from python.org.
Can anyone spot what I'm doing completely wrong? In particular, I'm using
'arch' to run my Python in 32-bit mode, but should I be installing a
plain-old 32 bit Python? I'll try that next, but for now...
Running any of the pyglet examples gives:
$ python examples/graphics.py
Traceback (most recent call last):
File "examples/graphics.py", line 50, in <module>
from pyglet.gl import *
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/gl/__init__.py",
line 235, in <module>
import pyglet.window
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/window/__init__.py",
line 1810, in <module>
gl._create_shadow_window()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/gl/__init__.py",
line 205, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/window/__init__.py",
line 493, in __init__
display = get_platform().get_default_display()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/window/__init__.py",
line 1759, in get_default_display
return pyglet.canvas.get_display()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/canvas/__init__.py",
line 82, in get_display
return Display()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/canvas/carbon.py",
line 22, in __init__
import MacOS
ImportError: No module named MacOS
The 'MacOS' module was removed from the stdlib in Python 3.x
http://docs.python.org/library/macos.html
How I got here is:
# get source from Hg, default branch:
$ hg clone https://code.google.com/p/pyglet/ pyglet
$ cd pyglet
$ mkvirtualenv -p python3.2 game
(game)$ python --version
Python 3.2.2
(game)$ python setup.py install
# This uses 100% of a CPU for 20 seconds, presumably doing the 2to3
conversion
(game)$ cd .. # to avoid importing the local source code
(game)$ python -c "import pyglet"
$ python -c "import pyglet"
Traceback (most recent call last):
...
ImportError: No module named objc
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
Exception: pyglet requires PyObjC when run in 64-bit Python; import objc
failed
# To fix this, I ask OSX to run my Python binary in 32 bit mode:
(game)$ alias python='arch -i386 python'
# and try again
(game)$ python -c "import pyglet"
# seems to work! Yay! But...
$ python -c "import pyglet.window"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/window/__init__.py",
line 1810, in <module>
gl._create_shadow_window()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/gl/__init__.py",
line 205, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/window/__init__.py",
line 493, in __init__
display = get_platform().get_default_display()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/window/__init__.py",
line 1759, in get_default_display
return pyglet.canvas.get_display()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/canvas/__init__.py",
line 82, in get_display
return Display()
File
"/Users/jhartley/.envs/game/lib/python3.2/site-packages/pyglet/canvas/carbon.py",
line 22, in __init__
import MacOS
ImportError: No module named MacOS
--
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/-/KZV2ytrYzxgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en.