简体   繁体   English

Offlineimap错误:ImportError:无法导入名称OfflineImap

[英]Offlineimap error: ImportError: cannot import name OfflineImap

In trying to use offlineimap under Linux, I am now getting the following error: 在Linux下尝试使用offlineimap时,出现以下错误:

Traceback (most recent call last):
  File "/usr/bin/offlineimap", line 20, in <module>
    from offlineimap import OfflineImap
ImportError: cannot import name OfflineImap

No matter what I do. 不管我做什么。 I wasn't originally getting this error, but I've tried purging and reinstalling offlineimap (and deleting .offlineimap) and it doesn't seem to help. 我本来没有收到此错误,但是我尝试清除并重新安装offlineimap(并删除.offlineimap),但似乎无济于事。

well, first thing first: does it work from the interactive python interpreter? 好,首先,第一件事:它可以在交互式python解释器中工作吗? Are you using virtualenv? 您在使用virtualenv吗? Maybe you have offlineimap installed in a virtualenv and are trying to call it globally. 也许您在virtualenv中安装了offlineimap,并试图在全球范围内调用它。

At last, I would check if the offlineimap.py file defines the OfflineImap class (or module?) 最后,我将检查offlineimap.py文件是否定义了OfflineImap类(或模块?)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM