If you are using a Linux distribution (such as Fedora, Mandrake, Debian, Gentoo, etc.) or a BSD system (such as FreeBSD, OpenBSD, etc.), then you probably already have Python installed on your system.
To test if you have Python installed, open a shell program
(such as konsole,
gnome-terminal, etc.) and enter the
command python -V and press
enter key (notice the capital
'V'
).
$ python -V Python 2.4
$
is the prompt of the shell. This will be
different for different systems, hence I will indicate the prompt
by just the $
symbol.
If you see such version information, then you have Python installed already.
However, if you get a message like this:
$ python -V bash: python: command not found
then, Python is not installed already. This is highly unlikely but possible.
In this case, you have two ways of installing Python on your system.
Install Python using the package management software that comes with your system. Examples of such software are yum in Fedora, urpmi in Mandrake, apt-get in Debian, emerge in Gentoo, and pkg_add in FreeBSD. Note that you need an internet connection on your system to use this method of installation.
You can compile and build Python from the
source
code and then install it. The instructions are pretty
straightforward and are part of the README
document that comes with the source code.