gtimelog在Mac OS上找不到通过Homebrew安装的pygtk

时间:2012-06-09 04:13:36

标签: python pygtk homebrew

我已经通过Homebrew安装了Python。我还通过Homebrew安装了pygtk

我通过pip安装了gtimelog但是它告诉我它已经安装了,它似乎已经在Homebrew中用Python了。

当我尝试运行gtimelog时,我得到ImportError: No module named pygtk

这似乎是一个$PYTHONPATH问题,但我似乎无法解决它。

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题。阅读Homebrew日志:

==> Installing pygtk
==> Downloading http://ftp.acc.umu.se/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/pygtk/2.24.0
==> make install 
==> Caveats
For non-Homebrew Python, you need to amend your PYTHONPATH like so:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
==> Summary

问题是,即使使用正确的PYTHONPATH,我在运行gtimelog时遇到错误:

$ gtimelog 
Traceback (most recent call last):
  File "/usr/local/bin/gtimelog", line 8, in <module>
    load_entry_point('gtimelog==0.8.0dev', 'gui_scripts', 'gtimelog')()
  File "/Library/Python/2.7/site-packages/gtimelog-0.8.0dev-py2.7.egg/gtimelog/main.py", line 2208, in main
    tray_icon = icon_class(main_window)
  File "/Library/Python/2.7/site-packages/gtimelog-0.8.0dev-py2.7.egg/gtimelog/main.py", line 1148, in __init__
    'style-updated', self.on_style_set) # Gtk+ 3
TypeError: <gtk.Window object at 0x10b443cd0 (GtkWindow at 0x7fe09aacd1d0)>: unknown signal name: style-updated

**更新:

对于Mountain Lion,你需要安装XQuarks,因为苹果不再使用他们的操作系统发送X11 ..

根据为什么gtimelog没有打开,这是一个gtimelog错误,如果你编辑〜/ .gtimelog / gtimelogrc并将show_tray_icon设置为False,你就可以了!