【发布时间】:2013-12-29 03:40:42
【问题描述】:
我正在编写一个脚本,甚至无法让一个基本的脚本正常工作。 Ghost 似乎没有正确导入。我不断收到以下错误:
>>>from ghost import Ghost
File "/Library/Python/2.7/site-packages/ghost/__init__.py", line 1, in <module>
from .ghost import Ghost, Error, TimeoutError
File "/Library/Python/2.7/site-packages/ghost/ghost.py", line 23, in <module>
if binding is None:
NameError: name 'binding' is not defined
代码没什么特别的:
from ghost import Ghost
ghost = Ghost()
我同时安装了 PySide 和 PyQt,并通过以下方式安装 Ghost:sudo pip install ghost
【问题讨论】: