Thread: [PyOpenGL-Users] ImportError: No module named _GL__init__
Brought to you by:
mcfletch
From: Richi P. <ri...@ri...> - 2004-06-15 17:52:23
|
Hi, Trying to run neveredit which uses pyopengl. Currently using PyOpenGL-2.0.1.07. I seem to have all the dependencies. Doing a 'python setup.py install' spews out a lot of warnings but doesn't stop on errors. After doing an 'import OpenGL', I get: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/OpenGL/__init__.py", line 26, in ? from GL.GL__init___ import __numeric_present__, __numeric_support__ File "/usr/lib/python2.3/site-packages/OpenGL/GL/__init__.py", line 2, in ? from GL__init__ import * File "/usr/lib/python2.3/site-packages/OpenGL/GL/GL__init__.py", line 4, in ? import _GL__init__ ImportError: No module named _GL__init__ On a lark, I smylink /usr/lib/python2.3/site-packages/OpenGL/GL/GL__init___.so to GL__init__.so and I get the following error: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/OpenGL/__init__.py", line 26, in ? from GL.GL__init___ import __numeric_present__, __numeric_support__ File "/usr/lib/python2.3/site-packages/OpenGL/GL/__init__.py", line 2, in ? from GL__init__ import * ImportError: dynamic module does not define init function (initGL__init__) I couldn't find any initGL__init__ symbols in GL__init___.so, but I did find a init_GL__init__ I really don't know anything about Python programming. Any help in figuring out my problem would be appreciated. -- Richi Plana |
From: Mike C. F. <mcf...@ro...> - 2004-06-15 18:21:44
|
I'll try to get some time to play and see what's going wrong on Sunday afternoon (he says, hoping he actually has *some* free time this weekend). _GL__init__ versus GL__init___ was a change between versions, so something to try in the meantime might be killing lib/python23/site-packages/OpenGL and recompiling, but if I'm reading your (and Dan's) mail correctly, you're both doing your first installs now, so that's not too likely to help. Good luck, Mike Richi Plana wrote: ... >After doing an 'import OpenGL', I get: > > ... >ImportError: No module named _GL__init__ > > ... ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ blog: http://zope.vex.net/~mcfletch/plumbing/ |
From: Mike C. F. <mcf...@ro...> - 2004-06-21 02:24:37
|
Okay, I just got finished building PyOpenGL 2.0.1.07 on Gentoo linux. I had to make a one-line change to setup/build_w.py, in the method "run": if not check_swig_version(swig_name): handle_wrong_swig_version() + self.swig_name = None The code was assuming that, if you have any SWIG installed, then you are going to use it. With older distros the only SWIG you'd be likely to have was the one for PyOpenGL, so the bug never came up, but newer distros apparently are all including it. You will likely need to delete the source-directory and re-extract your .tar.gz file in order to eliminate the messed-up wrapper files that will have been created by the previous failed attempts. HTH, Mike BTW, I only had time to check that dots.py is running with the compiled version, there may be further problems that particular test didn't reveal. I also didn't have Fedora Core handy, so it could be there's further problems there that aren't showing up on Gentoo. Mike C. Fletcher wrote: > I'll try to get some time to play and see what's going wrong on Sunday > afternoon (he says, hoping he actually has *some* free time this > weekend). _GL__init__ versus GL__init___ was a change between > versions, so something to try in the meantime might be killing > lib/python23/site-packages/OpenGL and recompiling, but if I'm reading > your (and Dan's) mail correctly, you're both doing your first installs > now, so that's not too likely to help. > > Good luck, > Mike ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ blog: http://zope.vex.net/~mcfletch/plumbing/ |
From: Dan C. <dc...@co...> - 2004-06-21 02:59:26
|
Mike, Tried the one-line change. Now I get: ImportError: No module named WGL__init__ The full traceback is below. Am I missing something else? Thanks for the help. Dan ------ Traceback (most recent call last): File "main.py", line 48, in ? run() File "main.py", line 42, in run core.init(width, height) File "/usr/local/lib/python2.3/site-packages/pyui/core.py", line 65, in init from renderers.openglPygame import OpenGLPygame File "/usr/local/lib/python2.3/site-packages/pyui/renderers/openglPygame.py", line 25, in ? from pyui.renderers import openglBase File "/usr/local/lib/python2.3/site-packages/pyui/renderers/openglBase.py", line 49, in ? from OpenGL.WGL import wglUseFontBitmaps, wglGetCurrentDC File "/usr/local/lib/python2.3/site-packages/OpenGL/WGL/__init__.py", line 2, in ? from WGL__init__ import * ImportError: No module named WGL__init__ > Okay, I just got finished building PyOpenGL 2.0.1.07 on Gentoo linux. I > had to make a one-line change to setup/build_w.py, in the method "run": > > if not check_swig_version(swig_name): > handle_wrong_swig_version() > + self.swig_name = None > |
From: Mike C. F. <mcf...@ro...> - 2004-06-21 04:24:29
|
WGL should *not* be built on Unix machines, it's the Win32 equivalent (loosely) of GLX (Unix) or AGL (Apple). Haven't really got time to look at it now, but I'd be suspicious that pyui/renderers/openglBase is doing something silly by using a platform-specific API w/out checking to see if they're on that platform. That is, the traceback looks like you've got PyOpenGL installed, and therefor you have the WGL wrapper Python modules, but not the .dll/.so (since there's no WGL available on your platform). Nothing excludes the wrapper modules from getting copied over on Unix, possibly something should, but that would just have made the exception show up a few levels higher in your traceback. Good luck, Mike Dan Charno wrote: ... > from pyui.renderers import openglBase > File > "/usr/local/lib/python2.3/site-packages/pyui/renderers/openglBase.py", > line 49, in ? from OpenGL.WGL import wglUseFontBitmaps, > wglGetCurrentDC > File > "/usr/local/lib/python2.3/site-packages/OpenGL/WGL/__init__.py", line > 2, in ? > from WGL__init__ import * > ImportError: No module named WGL__init__ ... ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ blog: http://zope.vex.net/~mcfletch/plumbing/ |
From: Richi P. <ri...@ri...> - 2004-06-21 03:07:51
|
Hi, I tried the two (2) line change (2 occurences of next lines) from a from scratch extractioin of the source, and I still get: >>> import OpenGL Traceback (most recent call last): File "<stdin>", line 1, in ? File "OpenGL/__init__.py", line 26, in ? from GL.GL__init___ import __numeric_present__, __numeric_support__ File "OpenGL/GL/__init__.py", line 2, in ? from GL__init__ import * ImportError: No module named GL__init__ I'm just glad that someone who understands what's going on has posted. Now that I know what to look for, I'll try my best to help. On Sun, 2004-06-20 at 20:24, Mike C. Fletcher wrote: > Okay, I just got finished building PyOpenGL 2.0.1.07 on Gentoo linux. I > had to make a one-line change to setup/build_w.py, in the method "run": > > if not check_swig_version(swig_name): > handle_wrong_swig_version() > + self.swig_name = None > > The code was assuming that, if you have any SWIG installed, then you are > going to use it. With older distros the only SWIG you'd be likely to > have was the one for PyOpenGL, so the bug never came up, but newer > distros apparently are all including it. > > You will likely need to delete the source-directory and re-extract your > .tar.gz file in order to eliminate the messed-up wrapper files that will > have been created by the previous failed attempts. > > HTH, > Mike > > BTW, I only had time to check that dots.py is running with the compiled > version, there may be further problems that particular test didn't > reveal. I also didn't have Fedora Core handy, so it could be there's > further problems there that aren't showing up on Gentoo. > > > Mike C. Fletcher wrote: > > > I'll try to get some time to play and see what's going wrong on Sunday > > afternoon (he says, hoping he actually has *some* free time this > > weekend). _GL__init__ versus GL__init___ was a change between > > versions, so something to try in the meantime might be killing > > lib/python23/site-packages/OpenGL and recompiling, but if I'm reading > > your (and Dan's) mail correctly, you're both doing your first installs > > now, so that's not too likely to help. > > > > Good luck, > > Mike > > > ________________________________________________ > Mike C. Fletcher > Designer, VR Plumber, Coder > http://members.rogers.com/mcfletch/ > blog: http://zope.vex.net/~mcfletch/plumbing/ > > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |