Guake Terminal抛出pynotify属性错误

时间:2017-04-06 18:40:52

标签: python ubuntu terminal

我经常在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'

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

1 个答案:

答案 0 :(得分:5)

名称与pynotify冲突。

我使用以下方式从PIP安装了pynotify

sudo pip install pynotify

由于这是错误的选择,我将其删除:

sudo pip uninstall pynotify

然后使用:

安装预期的pynotify
sudo apt install python-notify