我经常在Ubuntu上使用Guake终端。最近,它停止工作了。当我尝试使用终端运行时,出现以下错误:

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/dist-packages/guake/main.py", line 43, in <module>
from guake.guake_app import Guake
 File "/usr/lib/python2.7/dist-packages/guake/guake_app.py", line 49, in <module>
import guake.notifier
File "/usr/lib/python2.7/dist-packages/guake/notifier.py", line 31, in <module>
pynotify.init("Guake")
AttributeError: 'module' object has no attribute 'init'

可以找到concerent文件的源代码here on GitHub repo.系统上安装了pynotify。pynotify似乎有问题。

最佳答案

pynotify有名称冲突。
我从PIP安装了pynotify,使用:

sudo pip install pynotify

因为那是个错误的选择,所以我删除了它:
sudo pip uninstall pynotify

然后使用以下命令安装预期的pynotify
sudo apt install python-notify

09-28 12:05