2

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?

Jiew Meng
  • 10,677

1 Answers1

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
{
  GAE="(G)"
  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).