py2exe and pyOpenGL
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 ?
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 .
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.