Hello,

I'm doing a project doing atomic models and am using a toolkit that was developed for Python 2.4 on Ubuntu. I have Python 2.4 installed as my default python currently; however, when I download the tools I need from the synaptic package manager. They only work for my original default version of Python 2.6. And removing Python2.6 from my computer would cause the entire operating system to crash (as experienced when removing it using the synaptic package manager).

The python packages I need are:
Numeric, PIL, Pmw, PyOpenGL, readline, Tkinter

I believe I already have readline, but the others are still needed. Does anyone have any ideas or advice? It would be much appreciated. Thanks.

All of those are available for python 2.6
Reset python 2.6 and default and then open terminal and run this command:

sudo apt-get install python-numeric python-imaging python-opengl python-tk python-pmw

When prompted for your password, provide it.

If you're ever unsure about what package you need to install, do

sudo aptitude search term

Where term is the usual name of the software you want or something close

Yes, originally, I had no trouble getting all of the tools for Python2.6; however, the toolkit for the simulation program isn't compatible for some reason with 2.6 because it was made almost exclusively for 2.4. I've tried the program with 2.6, but I recieve an error when doing so. I've been able to download the Numeric package manually as of now to the 2.4 version, but I'm having a lot of trouble manually installing the other packages. Is there any compatability I can set up or a place where I can find these obsolete packages such as python2.4-imaging, python2.4-imaging-tk, etc. Apt-get says that they are obsolete.

Thanks for your help though.

I'm doing a project doing atomic models and am using a toolkit that was developed for Python 2.4 on Ubuntu

That toolkit should run under 2.6 even though it was developed using 2.4, so your first option is to try running it using 2.6. /usr/bin/python should point to python2.6 somewhere on the system (where depends on how it was configured).

If that doesn't work then you want to symlink the necessary libraries from/usr/lib/python(2.6)/site-packages to /usr/lib/python2.4/site-packages since they were obviously installed into the 2.6 libraries. They should work even though they were compiled against 2.6. The shebang in the toolkit would then be "#!/usr/bin/python2.4" or whatever. Alternatively you can run it with "/usr/bin/python2.4 toolkit.py".

If that doesn't work, then you will have to install each of these packages and make sure they are in, or symlinked to /usr/lib/python2.4/site-packages. Installing should be simple since they are mostly python scripts, but I'm not sure about all of them

We posted at the same time. Here is http://packages.ubuntu.com/dapper/python2.4-imaging-tk You wil probably have to click the download link on the far right and install using dpkg. And then you can use "search" at the top of the page for the rest. Try to get the package for the specific disto you are using or as close as possible. I use Slackware so am not sure, but it's something like "dpkg -i package-name" installs. Check man dpkg for details. Again, if it does not install into /usr/lib/python2.4/site-packages then simlink it Also, asking here is a good idea, but the Ubuntu forums are usually very good also for something Ubuntu specific.

Just wanted to see if they were available,
Tkinter should already be in /usr/lib/python2.4/lib and readline is not python specific
http://packages.ubuntu.com/search?searchon=names&keywords=numeric+2.4
http://packages.ubuntu.com/search?suite=default&section=all&arch=any&searchon=names&keywords=python+imaging+2.4
http://packages.ubuntu.com/search?suite=default&section=all&arch=any&searchon=names&keywords=pmw
http://packages.ubuntu.com/search?suite=default&section=all&arch=any&searchon=names&keywords=python+opengl
So clicking on dapper for Pmw says that it requires python 2.4, so you probably want packages built for that distro http://packages.ubuntu.com/dapper/python-pmw

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.