[Tutor] [Q] Install Python in RedHat

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Fri, 21 Dec 2001 20:05:18 -0800 (PST)

On Fri, 21 Dec 2001, Young-Jin Lee wrote:

> Hi, I have a question on how to install Python in redhat linux. (I was
> using Python in windows and now I want to use it on linux.)
> I downloaded the latest version of Python (2.2c1) into home directory.

(By the way, Python 2.2 final is released today!  Woohoo!  *grin*)

> I, then, did gunzip, tar xvf, ".configure", and make. After I tried to
> run python interpreter after installation, I still got the python
> 1.5.2, not python 2.2.2 rc1.

Did you do 'make install' afterwards?  The 'make' step will compile and
prepare the Python files, but it doesn't copy them to your '/usr/local'
directory until you do 'make install'.  You may need to use your root user
account to do this step.

By default, Python will install in '/usr/local' if you're on a Linux
system.  This can be redirected to a different location if you use the
'--prefix' option during the 'configure' step.

> Where is the right place to install the newer version of Python? What
> should I do to make the newer version to be a default Python
> interpreter for the linux?

You may need to check to see that your PATH puts preference of
'/usr/local/bin' over '/usr/bin'.  Make sure that '/usr/local/bin' comes
first in your PATH, and things should work ok.

Good luck to you.