py2exe and pyOpenGL

J

julia

Hi,

I'm having trouble turning a python program with pyOpenGL into an exe
with py2exe. I was wondering if you could help.

Basically I have a setup.py like this:

# setup.py
from distutils.core import setup
import py2exe
setup(console=["gltest.py"])
# end setup.py

(Note that my program gltest.py works just fine)

And when I do:

python setup.py py2exe --excludes=OpenGL

There is an error message that says:

The following modules appear to be missing
['OpenGL.GL', 'OpenGL.GLUT', 'dotblas', etc....

But I figured this was OK because of the excludes. So then I put the
OpenGL dir into the dist directory and when I try to run the exe I get
an ImportError:

No module named OpenGL.GL

Any idea where I'm going wrong?

Thanks so much for your time,
Julia
 
L

Larry Bates

Just guessing: py2exe moves everything
into local directory (or .zip file in
latest version) which would modify the
sys.path to only look there. I think
you will need to modify the system path
so it can find OpenGL directory.

HTH,
Larry Bats
Syscon, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top