'python' Bash command doesn't link to 2.1.1
Richard Jones
richard at bizarsoftware.com.au
Mon Aug 13 20:02:34 EDT 2001
On Tuesday 14 August 2001 10:23, root wrote:
> Hello, I've decided to use Python as my first programming language (as
> per advice at http://www.tuxedo.org/~esr/faqs/hacker-howto.html ) and
> I've run into a problem during installation.
Marvellous idea :)
> I cannot, however, run Python 2.1.1 using the 'python' terminal command
> and there is no Python man page installed. Typing 'python' at the
> command prompt brings up the 1.5.2 interpreter. I can run the 2.1.1
> interpreter by typing the path of the toplevel Python directory and then
> /python (e.g. /home/root/Python-2.1.1/python) but I don't want to have
> to do this every time I start the interpreter and I would also like to
> have the man page installed.
By default, python will be installed to /usr/local/bin. Your system will have
python 1.5.2 installed in /usr/bin. That binary will be found first when you
type "python" at the command line. To force using python 2.1.1, run
"/usr/local/bin/python".
Or, do the following (as root):
cp /usr/bin/python /usr/bin/python1.5
cd /home/root/Python-2.1.1/
make distclean
./configure --prefix=/usr
make install
the --prefix=/usr tells the install to place python in /usr/bin (and the
library files will go in /usr/lib/python2.1). Note, you'll want to remove the
"other" python2.1 installation too (/usr/local/bin/python and
/usr/local/lib/python2.1). The first command above just keeps the old python
around just in case you need it in the future.
Then you will be able to run "python" at the command prompt and get 2.1.1 :)
Richard
More information about the Python-list
mailing list