#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0

    py2exe and pyOpenGL


    Hello.
    I am trying to make my generated executable work, but I have a problem. I use the latest pyOpenGL, with Python 2.3 and use py2exe 0.5.
    I use the --excludes=OpenGL flag when running the script (following the advice found at puopengl doc page and copy the installed OpenGL package directly in the distribution folder (/dist). But still the application does not find it ("ImportError: No module named OpenGL.GL")
    At the project-page of pyOpenGL they have a "sample" for using py2exe with pyOpenGL. I have downloaded it, tried to rebuild the executables with their setups (but my py2exe of course) and failed in the same way :"ImportError: No module named OpenGL.GL"
    Am I doing something wrong ? How can this problem be solved ?
    Thank you.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Do your programs run before you try to compile them using py2exe? You should also probably try the examples provided as a way of testing everything works ok .

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    7
    Rep Power
    0
    yes of course the application works. I compiled applications with py2exe before, no problem, but they did not use pyOpenGL. But this one does. Also, regarding the examples provided by the pyopengl developers, I could not make it work when recompiling. Could it be a problem with the library.zip generated by py2exe ? In the given examples (made probably -my opinion- with another version of py2exe there is no library.zip). And it seems that my exe is looking for the resources there, not directly in the current folder. But as I can see, the zip is generated by py2exe with zlib and I would have to rebuild the archive again with zlib (including the OpenGL package) to make it work. I'll try this, eventually, but hope to find an easier way.

IMN logo majestic logo threadwatch logo seochat tools logo