Thread: [PyOpenGL-Users] Continued problems with PyOpenGL 2.0.1.04 on Mac OS X with (fink) Python 2.3
Brought to you by:
mcfletch
From: Richard M. <rp...@wa...> - 2003-05-12 17:07:29
|
I upgraded my Python to 2.3b over the weekend to try and fix the problems that were reported on this list last week (the problem was that Python 2.2 couldn't load multiple __init___.so files). Now I'm getting a different problem: Traceback (most recent call last): File "xyz_render_ogl.py", line 10, in ? from BallStickOGL import Scene File "/Users/rpm/Python/BallStickOGL.py", line 11, in ? from OpenGL.Tk import * File "/sw/lib/python2.3/site-packages/OpenGL/Tk/__init__.py", line 81, in ? _default_root.tk.call('package', 'require', 'Togl') _tkinter.TclError: can't find package Togl Does anyone have any suggestions for hacking around this? R. Rick Muller rp...@wa... http://wag.caltech.edu/home/rpm |
From: Mike C. F. <mcf...@ro...> - 2003-05-12 17:30:45
|
Togl is a binary extension to the Tk GUI, I can't really tell from your question whether you built PyOpenGL yourself, or solved the problem by using a binary distribution. If you built it yourself, it's quite likely that during configuration, you either didn't have tkinter installed, or you disabled the building of togl to try and get PyOpenGL to compile and then didn't turn it back on before the final compile (build_togl = 1 should be in your darwin.cfg)... just noticed that it's actually disabled by default in the latest source (Jack and co, is this for a reason? Does OS X even have tkinter?) If you used a binary installer, it's possible that the builder didn't include togl in the package, or possibly included it as a separate package. Check your OpenGL/Tk/ directory for a togl.so, and a pkgIndex.tcl file. If those are not there, then your package doesn't include togl, and you should ask the packager (likely Jack) if they have a togl compile available. If the files *are* there, it's possible the installation of the package is not triggering the registration with Tkinter/Tcl/Tk package manager which the setup.py file does. The actual command is at line 211 in togl_setup.py, it's basically something like this: tkinter_root_widget.tk.call( "pkg_mkIndex", "-verbose", "path/to/togl/directory", "togl.so" ) which you could do manually, but if you do and it works, let your packager (and us) know, so that we can attempt to fix the problem. Good luck, Mike Richard Muller wrote: > I upgraded my Python to 2.3b over the weekend to try and fix the > problems that were reported on this list last week (the problem was > that Python 2.2 couldn't load multiple __init___.so files). Now I'm > getting a different problem: > > Traceback (most recent call last): > File "xyz_render_ogl.py", line 10, in ? > from BallStickOGL import Scene > File "/Users/rpm/Python/BallStickOGL.py", line 11, in ? > from OpenGL.Tk import * > File "/sw/lib/python2.3/site-packages/OpenGL/Tk/__init__.py", line > 81, in ? > _default_root.tk.call('package', 'require', 'Togl') > _tkinter.TclError: can't find package Togl > > Does anyone have any suggestions for hacking around this? > > R. > > Rick Muller > rp...@wa... > http://wag.caltech.edu/home/rpm _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |
From: Richard M. <rp...@wa...> - 2003-05-12 19:01:56
|
You were correct, build_togl was set to 0 in the darwin.cfg file. I tried setting this to 1, but ran into some other problems when I tried to import OpenGL.GL: rpm-osx(~/Programs/PyOpenGL-2.0.1.04)106 % python Python 2.3b1 (#1, May 12 2003, 03:53:15) [GCC 3.1 20020420 (prerelease)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import OpenGL.GL Traceback (most recent call last): File "<stdin>", line 1, in ? File "OpenGL/__init__.py", line 26, in ? from GL.__init___ import __numeric_present__, __numeric_support__ ImportError: No module named GL.__init___ >>> The strange thing about this is that I was able to build and import OpenGL.GL before I changed build_togl to 1, it was only when I tried to import OpenGL.Tk that I ran into trouble. OS X does have Tkinter, through the fink interface, which is the version of Python I'm using. Has anyone successfully built togl under fink? If so, can you offer any pointers? Thanks in advance, Rick On Monday, May 12, 2003, at 10:29 AM, Mike C. Fletcher wrote: > > Togl is a binary extension to the Tk GUI, I can't really tell from > your question whether you built PyOpenGL yourself, or solved the > problem by using a binary distribution. If you built it yourself, > it's quite likely that during configuration, you either didn't have > tkinter installed, or you disabled the building of togl to try and get > PyOpenGL to compile and then didn't turn it back on before the final > compile (build_togl = 1 should be in your darwin.cfg)... just noticed > that it's actually disabled by default in the latest source (Jack and > co, is this for a reason? Does OS X even have tkinter?) > > Rick Muller rp...@wa... http://wag.caltech.edu/home/rpm |
From: Mike C. F. <mcf...@ro...> - 2003-05-12 19:29:36
|
You're running from the source directory, so it's got '.' in the python-path. It's picking up the source OpenGL/ directory as being on the python-path, and therefor a package. Switch to another directory and try it. HTH, Mike Richard Muller wrote: > rpm-osx(~/Programs/PyOpenGL-2.0.1.04)106 % python > Python 2.3b1 (#1, May 12 2003, 03:53:15) > [GCC 3.1 20020420 (prerelease)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import OpenGL.GL > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "OpenGL/__init__.py", line 26, in ? > from GL.__init___ import __numeric_present__, __numeric_support__ > ImportError: No module named GL.__init___ > >>> ... _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |