install Python-2.4.4 from source (parallel to existing Python-2.6)

Simon simon212 at gmx.de
Fri Jun 12 09:31:14 EDT 2009


edexter wrote:
> simon wrote:
>> Hi everybody,
>>
>> The situation:
>> I wrote a GUI, based on Python, TkInter and Pmw.
>> It runs perfectly fine with Python 2.4 (providing, TkInter and Pmw are
>> installed). But it crashes with Python 2.6. I tried this on MacOSX11.4
>> and various Linux Distributions.
>> Crashes occurs when I activate a Pmw.Diaog (I guess this is due to a bug
>> in the installed blt package), also when I use setitems on
>> Pmw.OptionMenu (I guess this is due to another package, associated with
>> tcl/tk).
>>
>> The target:
>> I have to get my GUI work under openSUSE 11.1 (x86_64).
>>
>> My plan:
>> On my openSUSE 11.1 (x86_64), Python 2.6 is installed by default.
>> I would like to know, how to install Python 2.4 along with TkInter and
>> Pmw (and packages that are required by them), parallel to the existing
>> Python 2.6. So that I do not break other software that depends on Python
>> 2.6.
>>
>> If you can think of another plan, I would be also glad to discuss it.
>>
>> Cheers,
>> Simon
> 
> I suspect you want to install python 2.4 and then reinstall 2.6  I did
> that in windows and I don't understand why it wouldn't work in linux

I'm afraid, installation is quit different under UNIX based systems and 
Windows.

I installed Python-2.4.4.tar.bz2 from python.org, using gcc-4.3 (within 
openSUSE 11.1 x86_64) via 'make altinstall'.

First, I tried to configure with the following flags: 
--prefix=/opt/python-24 --enable-framework --with-pydebug
This provoked an error during compilation via make (sorry, the list was 
so long, but I will post it, if it helps).

Second, configured again without any flags. The installation by 'make 
altinstall' to /usr/local was a success. Python2.6 seams unaffected, 
too. So, I got my parallel installation.

However, I cannot import modules like Tkinter or readline within python2.4.

For example, Tkinter.py is located in /usr/local/lib/python2.4/lib-tk

sys.path says: ['', '/usr/local/lib/python24.zip', 
'/usr/local/lib/python2.4', '/usr/local/lib/python2.4/plat-linux2', 
'/usr/local/lib/python2.4/lib-tk', 
'/usr/local/lib/python2.4/lib-dynload', 
'/usr/local/lib/python2.4/site-packages']

sys.prefix and sys.exec_prefix say: '/usr/local'

my bash's PATH variable says: 
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin

Which configuration step did I miss after my Python2.4 installation? 
What did I do wrong?

Cheers,
Simon



More information about the Python-list mailing list