I want to use Mozilla Jetpack and Google App Engine, which support only up to Python 2.6 and 2.5 respectively.

So I think I will have to install 2.5. Ubuntu comes with 2.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?


1 Answer 1


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).

  • 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, 2011 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, 2011 at 2:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .