'python' Bash command doesn't link to 2.1.1

Gerhard Häring gerhard.nospam at bigfoot.de
Mon Aug 13 19:45:28 EDT 2001


On Tue, 14 Aug 2001 00:23:19 +0000, t.scrace at btinternet.com 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.  My Linux (Linux PPC 2000)
>came packaged with Python 1.5.2 but I thought I'd upgrade to the latest
>version before I got started.  I unpacked the download and followed all
>the instructions in the README (./configure then make) and everything
>seemed to go fine.
>
>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.
>
>Could this be an problem with my Linux distribution, perhaps something
>to do with the directory structure?  I only started with Linux a few
>days ago so I'm probably way off - I'm making the transition from Mac OS
>to Linux.

You should do a "make install" (as root) in the /home/root/Python-2.1.1/
directory. This will install the Python interpreter, libraries and man pages in
/usr/local. 

It's a good idea *not* work do stuff as root unless it's absolutely necessary,
so now is a good time to create a user account for yourself if you haven't got
one already.

Once you have logged in as normal user, you can type "python" at the shell
again and see if it starts Python 2.1.1. If not, you should add /usr/local/bin
in front of your path. You can do this by adding the following line in the
.profile in the home directory:

export PATH=/usr/local/bin:$PATH

HTH and happy hacking with Python-and-Linux'ly yours,

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list