python jaunty django virtualization

May 31, 2009

the first problem that i ran into after installing Ubuntu 9.04 is that I could not start my django application and it threw error.

i had followed the django installation instructions available at its website and had made a symbolic link of my svn check out of django source to /usr/lib/python2.5/site-packages

later I realized that the default python with jaunty is 2.6 and hence decided to change it to 2.5 (also i could not find site-packages directory under /usr/lib/python2.6/ but did found dist-packages under it.)

here is all that i did to change the python’s default version to 2.5 from 2.6

i removed the symbolic link /usr/bin/python and linked it to python 2.5

$ sudo ln -s /usr/bin/python2.5 python

later i edited /usr/share/python/debian_defaults file and changed the default-version to python2.5

and started my django app successfully..

recently I upgraded my RAM for virtualization reasons and installed all related packages.. but when i tried starting the virt-manager, it threw error ‘No module named libvirt’

again it was due the version change that I did with regard to python, and I did the following for the virt-manager to work properly from the /usr/lib/python2.5/site-packages/ directory,

sudo ln -s /usr/lib/python2.6/dist-packages/libvirt.pyc .
sudo ln -s /usr/lib/python2.6/dist-packages/ .
sudo ln -s /usr/lib/python2.6/dist-packages/ .
sudo ln -s /usr/lib/python2.6/dist-packages/ .