By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

2 different python versions / how to install packages?

P: n/a
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)???

--
mailto: logan@phreaker(NoSpam).net

Jul 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Fri, 21 Nov 2003 22:41:45 +0100, Logan wrote:
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'.

--
mailto: logan@phreaker(NoSpam).net

Jul 18 '05 #2

P: n/a
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

--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
Jul 18 '05 #3

P: n/a
"""
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
Jul 18 '05 #4

P: n/a
On Tue, 25 Nov 2003 06:03:36 -0800, Ranger_Nemo wrote:
"""
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.
--
mailto: logan@phreaker(NoSpam).net

Jul 18 '05 #5

P: n/a
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.

On Tue, 2003-11-25 at 21:51, Logan wrote:
On Tue, 25 Nov 2003 06:03:36 -0800, Ranger_Nemo wrote:
"""
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.
--
mailto: logan@phreaker(NoSpam).net

--
Doveclaw <do******@users.sourceforge.net>
http://horizon2.sourceforge.net
Jul 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.