Found part of the problem and does not appear to be calibre related but a particular file that gets stomped on by lxml and mechanize. By default these two install the same file in the same place;
Code:
/usr/lib/python2.6/site-packages/easy-install.pth
So if I compile mechanize, it contains this;
Code:
import sys; sys.__plen = len(sys.path)
./mechanize-0.1.11-py2.6.egg
./ClientForm-0.2.10-py2.6.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
and then compiling lxml, it will contain this;
Code:
import sys; sys.__plen = len(sys.path)
./lxml-2.2.4-py2.6-linux-x86_64.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
So it is a chicken/egg thing with these and not a calibre issue and a matter of these two living together.