2 different python versions / how to install packages?

L

Logan

I have two different Python versions on my Linux system
(2.2 and 2.3). I cannot remove version 2.2 because many
configuration files of the system depend on this version
of Python (and its extensions).

Now I want to install extension packages for Python 2.3;
if the package is distributed via Distutils, this is no
problem: 'python2.3 setup.py install' will do the job (i.e.
put everything in the 'site-packages' folder of Python 2.3).

But how do I e.g. install PyGtk etc. etc. for my second
Python version (2.3)???
 
L

Logan

I have two different Python versions on my Linux system
(2.2 and 2.3). I cannot remove version 2.2 because many
configuration files of the system depend on this version
of Python (and its extensions).

Now I want to install extension packages for Python 2.3;
if the package is distributed via Distutils, this is no
problem: 'python2.3 setup.py install' will do the job (i.e.
put everything in the 'site-packages' folder of Python 2.3).

But how do I e.g. install PyGtk etc. etc. for my second
Python version (2.3)???

OK, figured it out for the following (compiling everything from
the sources):

- Tcl/Tk 8.4.4 (separate from Tcl/Tk 8.3.5 of Fedora Core 1)
- Python 2.3.2 with Tkinter
- libxml2/libxslt Python-bindings (libxml2 2.5.11)
- PyGTK 2.0.0 (Python bindings for GTK+ 2.0.x resp. 2.2.x)

Remark: This was not as straightforward as I thought; I think
(but maybe I am wrong) that Python is a mess on Red Hat 9 resp.
Fedora Core 1 Linux. If someone is interested in how to install
and use a 'separate & clean' Python 2.3 as described above on
Fedora Core 1, please let me know. I could post a short 'HOWTO'.
 
N

Nick Vargish

I would install Python 2.3 in a seperate location from the system
version. The system version is probably in /usr/bin, so install Python
2.3 with "--prefix=/usr/local".

Make sure /usr/local/bin is before /usr/bin in your PATH. Then, when
you run configure for the extensions you want to install, the
configure script should pick up /usr/local/bin/python, and all should
be well.

You will also need to make sure /usr/local/bin is before /usr/bin if
you use "#!/usr/bin/env python" in your scripts. Or you could just
explicitly say "#!/usr/local/bin/python" to make sure you're using the
"correct" version.

Nick
 
R

Ranger_Nemo

"""
If someone is interested in how to install and use a 'separate &
clean' Python 2.3 as described above on Fedora Core 1, please let me
know. I could post a short 'HOWTO'.
"""

I would. I've been working on it a bit for a couple weeks and haven't
made any progress.

TTFN,

Ranger_Nemo
 
L

Logan

"""
If someone is interested in how to install and use a 'separate &
clean' Python 2.3 as described above on Fedora Core 1, please let me
know. I could post a short 'HOWTO'.
"""

I would. I've been working on it a bit for a couple weeks and haven't
made any progress.

Hi Ranger Nemo,

I posted the HOWTO in a new thread called

'HOWTO: Python 2.3 on Fedora Core 1 Linux'
(posted on Nov., 26)

Please check it out!

HTH, L.
 
D

Doveclaw

Just wondering, but why would this be a problem. Fedora, like many Linux
distributions, has the irritating habit of installing the entire
distribution under /usr without making logical use of the /usr/local
tree. You just download the source, do the traditional
configure/make/make install dance and your good to go. The only
difference is you must type python2.3 since the python in /usr/bin will
take precedence over the one in /usr/local/bin. I'm using Fedora right
now, and all though I have not yet installed 2.3 on this distribution
the above is the standard way to install Python and I can't find much of
a reason as to why this wouldn't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top