Ok, the original question is (to me) ambiguous. What do you mean? Are you asking how to run/execute a python script? Or are you asking how to compile/install a python interpreter?
Answering the first question:
You don't have to "compile" python scripts. They will execute as a text file. You can execute the script in one of two ways:
1. Execute the interpreter (python) at the command line with the script as the first argument. For example:
Code:
username@host$ python script_name.py
OR
2. Make sure you have the path to the interpreter as the first line of the script, and give execute permissions to the script. For example:
Code:
username@host$ which python
/usr/local/bin/python
username@host$ chmod a+x script_name.py
username@host$ ./script_name.py
Contents of script_name.py
Code:
#!/usr/local/bin/python
...
==========================================
If you were originally asking how to install the python interpreter, you need to, again, do one of two things:
1. Install python using apt-get (or the GUI tools to add/remove packages)
OR
2. Compile the python interpreter from source code. This option requires you to download the source code, extract it, and then proceed with a series of commands (very similar, if not identical to what Arow gave) inside the directory containing the source code.