Re: [PyOpenGL-Users] Install/version Trouble?
Brought to you by:
mcfletch
From: Ian M. <ia...@ge...> - 2014-03-11 03:00:04
|
On Mon, Mar 10, 2014 at 7:51 PM, Adam Steele <avs...@gm...> wrote: > On Thu, Mar 6, 2014 at 10:39 PM, Ian Mallett <ia...@ge...> wrote: > >> On Thu, Mar 6, 2014 at 8:29 PM, Adam Steele <avs...@gm...> wrote: >> >>> PyOpenGL-3.0.2.win-amd64.exe >>> on a "from OpenGL.GL import *" this gives me error that look like some >>> conversion from python 2.x didn't take (some exceptions are of the form >>> "Exception Blah, err:") >>> >> You'll have to be more specific than that. >> >> > python 3.3 x64, install PyOpenGL-3.0.2.win-amd64.exe > > from OpenGL.GL import * > > Traceback (most recent call last): > File > "C:\Users\ADAM\workspace\oGL_examples\src\PyOpenGL_test\testbed.py", line > 13, in <module> > from OpenGL.GL import * > File "C:\Python33\lib\site-packages\OpenGL\GL\__init__.py", line 3, in > <module> > from OpenGL.GL.VERSION.GL_1_1 import * > File "C:\Python33\lib\site-packages\OpenGL\GL\VERSION\GL_1_1.py", line > 10, in <module> > from OpenGL import platform, constants, constant, arrays > File "C:\Python33\lib\site-packages\OpenGL\platform\__init__.py", line > 35, in <module> > _load() > File "C:\Python33\lib\site-packages\OpenGL\platform\__init__.py", line > 26, in _load > plugin_class = plugin.load() > File "C:\Python33\lib\site-packages\OpenGL\plugins.py", line 14, in load > return importByName( self.import_path ) > File "C:\Python33\lib\site-packages\OpenGL\plugins.py", line 28, in > importByName > module = __import__( ".".join(moduleName), {}, {}, moduleName) > File "C:\Python33\lib\site-packages\OpenGL\platform\win32.py", line 25 > except OSError, err: > ^ > SyntaxError: invalid syntax > I think you're right; this does look like a Python 2/3 issue. I'd recommend using the latest version of PyOpenGL (or using Python 2, if for some reason you can't). CC-ed Mike directly, although he's on the list, in case anything needs to be done. Once the context is set up, you should be fine calling functions from either. If you need some test code, my basecode<http://geometrian.com/programming/tutorials/OpenGL%20Program%20Shell.py.txt>shows OpenGL 2 usage, and is quite robust. Ian |