Thread: [PyOpenGL-Users] difficulties installing pyOpenGL on Linux
Brought to you by:
mcfletch
From: Miriam E. <mi...@mi...> - 2007-09-18 07:18:16
|
Hi folks, I've run pyOpenGL on Win32 for a year or two now, but over that period have been gradually migrating to Linux -- specifically Puppy Linux. This has probably made installing pyOpenGL (and a few other things) harder than it needs to be because Puppy is a fairly young distribution. Its great advantages are its small size and its speed. Most modern Linuxes are going a similar bloated route to MSWindows. Anyway... I have got python working fine with pygame, and can run all the demos except the glcube.py example. It prints "The GLCUBE example requires PyOpenGL". No problem, thought I. That's next on my list to install. So I go to sourceforge and... ummm... an egg??? OK, so I read up about them (seems a little like making things more complicated to make them easier), download the required tools and install them, then install PyOpenGL-3.0.0a6. Everything seems to go fine. I now try the glcube example again and it gives the same message: "The GLCUBE example requires PyOpenGL" Very odd... I decide to try another example, just in case it is something related to that particular file. I select the dots.py example from the PyOpenGL_Demo-3.0.0a6 collection. This time the error I get is: Traceback (most recent call last): File "dots.py", line 24, in ? from OpenGL.GL import * File "/usr/lib/python2.4/site-packages/PyOpenGL_Demo-3.0.0a6-py2.4.egg/PyOpenGL-Demo/da/__init__.py", line 2, in ? File "/usr/lib/python2.4/site-packages/PyOpenGL_Demo-3.0.0a6-py2.4.egg/PyOpenGL-Demo/da/__init__.py", line 6, in ? File "build/bdist.linux-i686/egg/OpenGL/raw/GL/constants.py", line 6, in ? ImportError: No module named ctypes It is true I have no module named ctypes, but I haven't needed it previously when using Win32 and I can't find mention of it in the python2.4 documentation. Does anybody know what this means? I was going to uninstall PyOpenGL-3.0.0a6 so that I could install an older version, but I can't find any mechanism for this. Previously I would just delete the folder in site-packages and the PyOpenGL.pth file, but they aren't there anymore -- there is a PyOpenGL-3.0.0a6-py2.4.egg file and an easy-install.pth file, but I'm a little reluctant to tamper with automated install systems in case I screw up info that they need ...but I do it anyway (actually I move them to a safe place so I can restore them later if I want. I try running python setup.py install on the PyOpenGL-2.0.2.01 source and after thousands of warnings scroll by it ends with error: command 'gcc' failed with exit status 1 I've had no problems compiling the SDL libs and various other things, so I wonder if it doesn't know where to find some source files. Wouldn't they accompany PyOpenGL? I don't know. I definitely have OpebGL installed and working and can run many binary OpenGL demos. And I installed the nVidia driver for my card, which put a number of gl*.h files in /usr/include/GL/ which, I guess could be the wrong place... but I have no idea how to find that out. Now I try a binary installable made for Fedora (shaky, I know, but I've had some success installing binaries for RedHat and Debian before). But this gives no joy at all. Running dots.py (or any other PyOpenGL demo) results in Traceback (most recent call last): File "dots.py", line 24, in ? from OpenGL.GL import * File "/usr/lib/python2.4/site-packages/OpenGL/__init__.py", line 26, in ? from GL._GL__init__ import __numeric_present__, __numeric_support__ File "/usr/lib/python2.4/site-packages/OpenGL/GL/__init__.py", line 2, in ? from GL__init__ import * File "/usr/lib/python2.4/site-packages/OpenGL/GL/GL__init__.py", line 5, in ? import _GL__init__ ImportError: /lib/libc.so.6: version `GLIBC_2.4' not found (required by /usr/lib/python2.4/site-packages/OpenGL/GL/_GL__init__.so) On my machine /lib/libc.so.6 does exist, but is a link to libc-2.3.5.s0 So does that mean I need a newer version of libc? And if so, why did the setuptools installer not balk at it? If it is a dependency then shouldn't it be included? or listed as a dependency? Or is it a result of me blythely dropping in an incompatible version? Sheesh. Lucky I'm a ridiculously patient person. I've tried a few other times to install PyOpenGL on Puppy and run out of time after spending a day or so at it. This time I've finally decided to turn to the list... Help!!! :) Cheers, - Miriam -- ---------=---------=---------=---------=---------=---------=------ A life! Cool! Where can I download one of those from? ---------=---------=---------=---------=---------=---------=------ Website: http://miriam-english.org Blog: http://www.livejournal.com/users/miriam_e/ |
From: Miriam E. <mi...@mi...> - 2007-09-18 11:05:35
|
Okay, so long story short, I found ctypes on the net (it is new to python2.5 so I don't really understand why it is needed for python2.4). I downloaded and installed it and PyOpenGL works! ...kinda... The dots.py demo works, but I still have problems. Firstly when I ran some demos that use PIL I got the error "The _imaging C module is not installed" Upshot: I re-installed PIL. Now I get a bewildering array of error messages for various of the PyOpenGL programs (they all work fine on Win32). None of the GLE demos work or any other demos using textures. Many things give AttributeError: pixel_access. Many other things have other errors, like dek/MandelImage.py which says Numeric.ravel(xx+yy[:,Numeric.NewAxis]) doesn't have NewAxis attribute. I installed Numeric recently. I'm sure MandelImage is older than Numeric... but waaaiit... I tried an old version of MandelImage and the error disappears (now we have the PIL pixel_access error). texturesurf.py and tile.py say tkinter can't find togl. Huh? I never needed togl on Win32. I guess I need to find and install it. [sigh] How can this be so damn hard? Oh well... at least dots.py is working, and a few other things like the GLUT demos (but not conesave.py -- it spits the dummy when given the wrong number type... in a dynamically type-converting language?), and a few of the more primitive NeHe demos work, and the redbook examples. Time to put this aside and get back to other things. I may, at times, spend days getting things to work, coming back again and again to try more after being thwarted. If I do this with PyOpenGL and still am unable to get it working cleanly, what are the chances that this can get any sort of wide acceptance? I really, really want this to work, but I'm starting to get a desperately strong impression of a structure built upon shifting sands. How can I recommend this to anyone else? How can I hope to build usable worlds? I still intend to get this to work. I consider python the best hope in many ways. And I don't mean to be critical. I realise the incredible amount of time and brillance put into this. It's just... these things worry me greatly. Cheers, - Miriam -- ---------=---------=---------=---------=---------=---------=------ A life! Cool! Where can I download one of those from? ---------=---------=---------=---------=---------=---------=------ Website: http://miriam-english.org Blog: http://www.livejournal.com/users/miriam_e/ |
From: Miriam E. <mi...@mi...> - 2007-09-18 12:38:21
|
So much for putting it aside... Installed togl and more recent version of PIL (1.1.6 instead of 1.1.5) and just about everything works... cool! ...except a pesky problem with the original pygame program glcube.py but that's a problem for the pygame list. Sorry about the 5 hour long monologue on the list. I'll try to write up a piece on how I managed this and send it. It might be useful for some other poor lost souls. Cheers, - Miriam -- ---------=---------=---------=---------=---------=---------=------ A life! Cool! Where can I download one of those from? ---------=---------=---------=---------=---------=---------=------ Website: http://miriam-english.org Blog: http://www.livejournal.com/users/miriam_e/ |
From: Mike C. F. <mcf...@vr...> - 2007-09-18 14:30:53
|
Miriam English wrote: > So much for putting it aside... > Installed togl and more recent version of PIL (1.1.6 instead of 1.1.5) > and just about everything works... cool! ...except a pesky problem with > the original pygame program glcube.py but that's a problem for the > pygame list. > > Sorry about the 5 hour long monologue on the list. I'll try to write up > a piece on how I managed this and send it. It might be useful for some > other poor lost souls. > It's a good data point. I'd appreciate the write-up so that we can help others get around installation problems... The installation page is still just the 2.x series at the moment and needs to get the 3.x notes up at some point. Take care, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2007-09-18 14:25:20
|
Miriam English wrote: ... Wow, name from the deep-dark past. Hi Miriam! > So I go to sourceforge and... ummm... an egg??? OK, so I read up about > them (seems a little like making things more complicated to make them > easier), Yeah, setuptools isn't a slam-dunk win, it's better than what went before (normally), but it's not perfect. Eventually the hope is that *something* will go into Python core that does the same basic job. > download the required tools and install them, then install > PyOpenGL-3.0.0a6. Everything seems to go fine. > > I now try the glcube example again and it gives the same message: > "The GLCUBE example requires PyOpenGL" > Very odd... > > I decide to try another example, just in case it is something related to > that particular file. I select the dots.py example from the > PyOpenGL_Demo-3.0.0a6 collection. This time the error I get is: > ... > ImportError: No module named ctypes > ... > It is true I have no module named ctypes, but I haven't needed it > previously when using Win32 and I can't find mention of it in the > python2.4 documentation. Does anybody know what this means? > ctypes is built-in in Python 2.5. You likely have Python 2.5 on your Windows system and 2.4 on your Puppy Linux system. ctypes can be downloaded and installed from the ctypes page on SourceForge: http://sourceforge.net/project/showfiles.php?group_id=71702 choose the .tar.gz and run the setup.py to build the package. Most linux distributions have a package for it, but I'm guessing puppy doesn't provide one. 3.0.0 is basically just waiting for me to have time to release as beta1, it's recommended for any new development you are doing. The build process for 2.x is just so horribly tortuous that it qualifies as fundamentally broken. > Sheesh. Lucky I'm a ridiculously patient person. I've tried a few other > times to install PyOpenGL on Puppy and run out of time after spending a > day or so at it. This time I've finally decided to turn to the list... > Good luck, and thanks for your ridiculous patience :) . Feel free to turn to the list sooner next time, installation is probably the biggest source of frustration with the project at the moment. Have fun, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |