Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use Mozilla Jetpack & Google App Engine which supports only up to Python 2.6 & 2.5 respectively. So I think I will have to install 2.5. Ubuntu comes with 2.6.6 I think Ubuntu 11 comes with 2.7? How might I downgrade or install separate Python for different usages? I think I read that its not a good idea to uninstall/downgrade python as Ubuntu uses it? If so how do I fix this?

share|improve this question

The answer on this thread should work for you: What's the best way to get Python 2.5 and 2.7 on Ubuntu 10.04

share|improve this answer
So I installed Python 2.5 in /usr/local/python25 following this tut problem is when I run python2.5 --version I still get 2.7, I did something wrong? ./python --version will give 2.5 tho – Jiew Meng Apr 23 '11 at 12:15
That tutorial does not look like the instructions I linked you to above. – brousch Apr 24 '11 at 15:49

You can always install different versions of Python, they will coexist happily, just make sure you do not override the standard location (i.e. choose a different installation root directory).

For general use, make sure the old ones are generally not in your PATH.

When you need to test you GAE development, add the path to the 2.5 version and to GAE root directory in front of your PATH and you are set. For this to be convenient, I have created a function (could be an alias) in my .bashrc to change my PATH variable. Works like a charm.

function add_path
  (echo $PATH | fgrep "$1" >/dev/null) || export PATH="$1:$PATH"

function gae
  add_path /usr/local/share/Python-2.5.5/
  add_path /usr/local/share/google_appengine/

Of course locations may differ in your system.

I use the GAE variable in my PS1 so that I know when I have used that function - and I have a visual reminder to tell me I am set for GAE (i.e. I use the old Python version).

share|improve this answer
erm, what language is that? and how do I run it? It will be great if you could add some comments. They are just functions, so I will need to call them somehow? – Jiew Meng Apr 23 '11 at 1:10
@jiewmeng: this is bash shell. As I suggested, the best thing is to write this in your .bashrc file (in your home directory), and on the command line, run gae to set your path before you run any GAE related command. But your answer suggests that you might need to learn a bit more about bash (or whatever shell you use - though if you use a different shell you might have to adapt my suggestion). – asoundmove Apr 23 '11 at 2:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.