[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using two versions of Python

Edward C. Jones wrote:
I have the package "python2.3_2.3.4+2.3.5c1-1_i386.deb" on my Debian sid
system.  I also compiled the Python tarball. It is in "/usr/local".  I
would like all of the code that I have written to use Python 2.4 without
messing up all the Debian packages that use 2.3. My programs all contain
"#! /usr/bin/env python".  I would prefer not to change them all. How
can I do this?

First: Python 2.4 is available, why not just install it with apt-get?

$ apt-cache policy python2.4
  Installed: (none)
  Candidate: 2.4-3

Second, check out update-alternatives(8).  With it, specifically the
--install option, you can setup /usr/bin/python or /usr/local/bin/python
to be a symlink to /etc/alternatives/python, which you can in turn
make a symlink to whichever python interpreter you like.


Roberto Sanchez

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: