我正在尝试在我的Mac电脑上安装Python的软件包tkSnack(http://www.speech.kth.se/snack/)。
我下载了软件包,运行了“setup.py”文件并没有收到任何错误消息。但是,当我尝试如下初始化时,我收到一条错误消息:
from Tkinter import * root = Tk() import tkSnack tkSnack.initializeSnack(root)
输入最后一行后收到错误消息:
>>> from Tkinter import * >>> from tkSnack import * >>> root = Tk() >>> tkSnack.initializeSnack(root) Traceback (most recent call last): File "", line 1, in File "tkSnack.py", line 21, in initializeSnack Tkroot.tk.call('eval', 'package require snack') _tkinter.TclError: can't find package snack
感谢。
编辑: 运行setup.py文件后添加了输出:
Fredriks-MacBook-Air:python Fredrik$ sudo python setup.py install running install running build running build_py creating build creating build/lib copying tkSnack.py -> build/lib running install_lib byte-compiling /Library/Python/2.7/site-packages/tkSnack.py to tkSnack.pyc running install_egg_info Writing /Library/Python/2.7/site-packages/tkSnack-2.2.9-py2.7.egg-info Fredriks-MacBook-Air:python Fredrik$