laplace
laplace

Reputation: 11

PyOpenGL - import error: No module named GL

I recently installed pythonxy and tried to run code which start with (in Eclipse):

from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *

and got

from OpenGL.GL import *
ImportError: No module named GL

I uninstalled pythonxy, install full version of EPD and the same error...

sys.path gave me:

['D:\\eclipse-java-indigo-SR2-   win32\\eclipse\\plugins\\org.python.pydev_2.7.1.2012100913\\pysrc',
'C:\\Users\\Kuba\\workspace\\python\\ThinkPython\\src',
'C:\\Python27\\lib\\site-packages\\pyopengl-3.0.2-py2.7-win32.egg',
'C:\\Python27\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:\\Python27\\lib\\site-packages\\PIL',
'C:\\Python27\\lib\\site-packages\\win32',
'C:\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\Python27\\lib\\site-packages\\IPython\\extensions']

As you can see - I'm working on Windows machine.

I saw similar questions here, but nothing helped...

I'm new to python - maybe solution is simple...

Any suggestions ?

Regards

Upvotes: 1

Views: 6365

Answers (2)

gamesun
gamesun

Reputation: 229

I got the same error for filename is OpenGL.py. If your file's name is the same, try renaming it.

Upvotes: 1

danodonovan
danodonovan

Reputation: 20353

You have an installation issue with your PyOpenGL module. Older versions of EPD (pre 6.2-1) had an issue with the 64bit PyOpenGL package - you may need to update EPD.

Alternatively, you could try to install through easy_install

C:\Python27\scripts\easy_install pyopengl

or pip

C:\Python27\scripts\pip pyopengl

or using the binaries on Christoph Gohlke's site.

Personally I'd recommend installing Chris' binaries - they've always worked well for me.

Upvotes: 2

Related Questions