Hi everybody,

I'm a mac user, I have a mac os x 10.4.11. my mac come with a python
2.3 on it. to use cocos, I installed python 2.5.5 with the source code
(./configure, make, make install) and then I installed pyglet 1.1.4
from the shell using the command
$ python setup.py install

everything went well but troubles began with the cocos hello world. I
copied cocos folder to my project directory where i have my hello
world and the compiled my code with

$ python hello_world.py

but I got the error


Traceback (most recent call last):
  File "hello_world.py", line 11, in <module>
    import cocos
  File "/Users/abdellahchkifa/Desktop/MyFirstCocosApp/cocos/
__init__.py", line 67, in <module>
    import actions
  File "/Users/abdellahchkifa/Desktop/MyFirstCocosApp/cocos/actions/
__init__.py", line 36, in <module>
    from basegrid_actions import *
  File "/Users/abdellahchkifa/Desktop/MyFirstCocosApp/cocos/actions/
basegrid_actions.py", line 61, in <module>
    from pyglet.gl import *
  File "/usr/local/lib/python2.5/site-packages/pyglet/gl/__init__.py",
line 510, in <module>
    import pyglet.window
  File "/usr/local/lib/python2.5/site-packages/pyglet/window/
__init__.py", line 1684, in <module>
    gl._create_shadow_window()
  File "/usr/local/lib/python2.5/site-packages/pyglet/gl/__init__.py",
line 494, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/usr/local/lib/python2.5/site-packages/pyglet/window/
__init__.py", line 626, in __init__
    display = get_platform().get_default_display()
  File "/usr/local/lib/python2.5/site-packages/pyglet/window/carbon/
__init__.py", line 108, in get_default_display
    self._display = CarbonDisplay()
  File "/usr/local/lib/python2.5/site-packages/pyglet/window/carbon/
__init__.py", line 120, in __init__
    raise CarbonException('Window manager is not available.  ' \
pyglet.window.carbon.CarbonException: Window manager is not
available.  Ensure you run "pythonw", not "python"


I guess the problem is that python couldn't launch the display (3 last
lines) then I tried


$ pythonw hello_world.py

as suggested but this time I got


Traceback (most recent call last):
  File "hello_world.py", line 11, in ?
    import cocos
  File "/Users/abdellahchkifa/Desktop/MyFirstCocosApp/cocos/
__init__.py", line 62, in ?
    import os, pyglet
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/pyglet/__init__.py", line 69, in ?
    _require_ctypes_version('1.0.0')
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/pyglet/__init__.py", line 64, in
_require_ctypes_version
    import ctypes
ImportError: No module named ctypes


notice that this time, pythonw looks for frameworks in the python2.3
version directory, weird.

a detailed help would be appreciated, I'm a total beginner to python,
pyglet and cocos.

best regards.


-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
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/cocos-discuss?hl=en.

Reply via email to