%tags

 

For all those http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>App Engine developers who must have faced a bundle of errors while running http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>App Engine on Ubuntu 9.04 (Jaunty Jackelope), here is a quick fix that must work:


Problem:

Ubuntu 9.04 ships with Python2.6 by default whereas http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>App Engine requires Python2.5 and there’s pretty much difference between the two.

Solution:

Since Python would be read as Python2.6 by Ubuntu therefore you need to specify the version of Python explicitly in the environment variable in dev_appserver.py configuration file. Follow these steps:

1) Install Python2.5 if it isn’t yet installed by this command:

sudo apt-get install python2.5

2) Edit google_appengine/dev_appserver.py

Change the environment variable (first line) from…

#!/usr/bin/env python

to…

#!/usr/bin/env python2.5

That’s it! Your code should run now since http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>http://www.programmerfish.com/category/app-engine-google/’ target=’_blank’>App Engine now knows which Python version to use.

Join ProgrammerFish Facebook Fan Page to get instant updates.