Thanks for that but Im not too familiar with py2exe.
This is what my setup looks like:

#!/usr/bin/env python
from distutils.core import setup
import py2exe
options = {'py2exe':{'excludes':['OpenGL'],


But it gives me the error:

Traceback (most recent call last):
  File "", line 12, in <module>
  File "C:\Python25\lib\distutils\", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:\Python25\lib\site-packages\py2exe\", line 80, in __i
    distutils.dist.Distribution.__init__(self, attrs)
  File "C:\Python25\lib\distutils\", line 237, in __init__
    for (command, cmd_options) in options.items():
AttributeError: 'tuple' object has no attribute 'items'

What am I doing wrong?
Thanks again

Sébastien Ramage wrote:
Hi !
I have the same problem and it seems to be a problem with eggs.
I have solved it by copying PyOpenGL-3.0.0b1-py2.5.egg and 
setuptools-0.6c7-py2.5.egg in my app directory
and add this on header of my script :

import sys
import os
sys.path.insert(0, os.path.join(sys.prefix, "PyOpenGL-3.0.0b1-py2.5.egg"))
sys.path.insert(0, os.path.join(sys.prefix, "setuptools-0.6c7-py2.5.egg"))

and add this in my setup script:

    options = {'py2exe':{'excludes':['OpenGL'],


Astan Chee a écrit :
  Im trying to make a .exe out of a pygame/pyopengl script using py2exe.
  The headers of my script looks like this:
  import sys
  from OpenGL.GL import *
  from OpenGL.GLU import *
  from OpenGL.arrays import formathandler
  formathandler.FormatHandler.chooseOutput( 'ctypesarrays' )
  import os, math, random
  import pygame
  from pygame.locals import *
  if sys.platform == 'win32' or sys.platform == 'win64':
     os.environ['SDL_VIDEO_CENTERED'] = '1'

  Im using py2exe 0.6.6 and pyopengl 3.0.0b1, and my file looks
  like this:

  #!/usr/bin/env python
  from distutils.core import setup
  import py2exe


  And I can make the .exe fine, but when I try to run the .exe, I keep
  getting this error:

  Traceback (most recent call last):
   File "", line 2, in <module>
   File "OpenGL\GL\__init__.pyc", line 2, in <module>
   File "OpenGL\raw\GL\__init__.pyc", line 6, in <module>
   File "OpenGL\raw\GL\constants.pyc", line 7, in <module>
   File "OpenGL\platform\__init__.pyc", line 57, in <module>
   File "OpenGL\platform\__init__.pyc", line 53, in _load
  RuntimeError: Unable to find an implementation for the 'win32' ('nt')

  I've tried various things like copying the openGL folder to the .exe
  folder and such, but it didnt work. What am I doing wrong here?


This email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2.;198757673;13503038;p?
Py2exe-users mailing list


"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."

Please think of the environment before printing this email.

This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information
contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.