ImportError: No module named offlineimap

Thomas Boehm t_boehm at
Sat Jan 14 20:25:34 GMT 2012

Sebastian Spaeth wrote:
> On Wed, 21 Dec 2011 19:07:45 +0000, Thomas Boehm wrote:
> Hi THomas,
>> I'm trying to install offlineimap 6.4.2 systemwide on my Ubuntu 10.04
>> LTS system. I followed the instractions by downloading the tar.gz,
>> extracting it and running "python2.6 install". It creates the
>> script /usr/local/bin/offlineimap. When I execute it, I get the error
> Did you solve this? 10.10 has python 2.7 as a default, doesn't it (ie
> what is being invoked when you call python)? In that case, you had been
> installing OLI with python2.6, so it ends up in
> /usr/local/lib/python2.6/* and when /usr/local/bin/offlineimap invokes
> python it will start the default (ie 2.7) which can't find it, as it is
> not installed as a python 2.7 package. Does this theory sound about
> right?

Not really. I'm still using 10.04 and only have python 2.6 installed.
All the offlineimap files are in

> calling directly will work, because it first tries to
> import modules from the same directory as the script it is in, so it
> will find the local offlineimap stuff in that directory.
> If you want to use python 2.6 you can change the first line in
> /usr/local/bin/offlineimap to
> #!/usr/bin/env python2.6
> Hope that helps.

This didn't help. It was #!/usr/bin/python2.6 already and I get the same
error when I change it to #!/usr/bin/env python2.6.

> PS. Do use 6.5.0, 6.4.1-6.4.4 are unfortunately flawed.

Will try it later. Didn't know that there is an update available. Maybe
that solves the problem.

More information about the OfflineIMAP-project mailing list