我正在编写一个脚本,甚至无法让一个基本的脚本正常工作。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