I am interested in playing with OpenGL in Python. I used OpenGL in C ++ and Objective-C, but I don't have much experience in Python. I am wondering if there is a good tutorial that works in Snow Leopard. I would prefer to stay in 64-bit mode, if possible, since I heard that 32-bit programs require downloading a large number of additional 32-bit libraries.
I already tried the PyOpenGL / wxPython tutorial . When I ran the code, it crashed with this message:
ImportError: /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
There seems to be an error in wxPython that prevents it from working on a 64-bit system.
I also looked at Pyglet, but they have a similar problem . They provide a workaround (setting Python to 32-bit mode), but it doesn't seem like they will fix it.
Finally, I looked at PyGLUT, but I think it is only for Windows.
Are there any other libraries that will allow me to access OpenGL and draw on the screen? Again, I would rather stay in 64-bit mode, but if all else fails, I will switch to 32-bit and try wxPython or Pyglet again.
Edit: I also tried PyGame. It depends on the SDL, which is broken in SL. I was thinking of trying to use Cocoa through PyObjc, but the Python Xcode application templates were removed .
source share