<p>I take it back. Adding apparently relevant directories to the PYTHONPATH variable hasn't actually helped.<br/>
</p>
<p><br/>
I tried all of these, and still it says it can't import unless I've called it from inside some offlineimap directory:<br/>
</p>
<p><br/>
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages/offlineimap/repository<br/>
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages/offlineimap/folder<br/>
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages/offlineimap/ui<br/>
PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages/offlineimap/<br/>
</p>
<p><br/>
</p>
<p><br/>
</p>
<p><br/>
Eygene Ryabinkin writes:<br/>
</p>
<p><br/>
> Fri, Aug 24, 2012 at 11:59:14AM -0500, Benjamin Slade wrote:<br/>
>> On my own system, I'm having an odd problem with offlineimap. I've cloned<br/>
>> the git repository, and done a system-wide install via "make clean",<br/>
>> "make", "sudo python setup.py install".<br/>
><br/>
> Where OfflineIMAP stuff gets installed?<br/>
><br/>
>> If I call "offlineimap" from any location other than than inside of the<br/>
>> downloaded git repo (e.g. from the commandline while in my home directory,<br/>
>> for instance), I get the following error:<br/>
>> <br/>
>> Traceback (most recent call last):<br/>
>> File "/usr/local/bin/offlineimap", line 20, in <module><br/>
>> from offlineimap import OfflineImap<br/>
>> ImportError: cannot import name OfflineImap<br/>
><br/>
> Seems like your OfflineIMAP installation path isn't in the Python's<br/>
> search path. Does the output of<br/>
> {{{<br/>
> python -c 'import sys; print sys.path'<br/>
> }}}<br/>
> contain the directory where your OfflineIMAP installation lives.<br/>
> Something like '/usr/local/lib/python2.6/site-packages'.<br/>
><br/>
>> If I call "offlineimap" while I'm inside of the git repo, then<br/>
>> everything works as expected.<br/>
><br/>
> Because Python looks for the imports in the current directory too.<br/>
</p>
<p><br/>
</p>
<p><br/>
– <br/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/>
Dr Benjamin Slade [ <a href="http://ling.uta.edu/~ben/">http://ling.uta.edu/~ben/</a> ]<br/>
Dept. of Linguistics & TESOL - University of Texas at Arlington <br/>
132E Hammond Hall | Office Hours: tba<br/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/>
{sent from Emacs running under GNU/Linux}<br/>
</p>