试图运行Python 2.7中的一个基本示例Pyprocessing脚本,我得到了以下错误消息。知道是什么原因吗?
Traceback (most recent call last):
File "C:UserserezDocumentsRobinscriptsPythonnetworkx-eg1.py", line 10, in <module>
run()
File "C:Python27libsite-packagespyprocessing-0.1.2.7-py2.7.eggpyprocessing__init__.py", line 383, in run
pyglet.app.run()
File "C:Python27libsite-packagespygletapp__init__.py", line 123, in run
event_loop.run()
File "C:Python27libsite-packagespygletappbase.py", line 135, in run
self._run_estimated()
File "C:Python27libsite-packagespygletappbase.py", line 164, in _run_estimated
timeout = self.idle()
File "C:Python27libsite-packagespygletappbase.py", line 280, in idle
window.flip()
File "C:Python27libsite-packagespyprocessing-0.1.2.7-py2.7.eggpyprocessingflippolicy.py", line 149, in flip
currentpos = (c_int*2)(0)
NameError: global name 'c_int' is not defined
这看起来像是pyprocessing中的一个bug。您使用的是1.2.7版本,在该版本中,文件flippolicy.py
指的是c_int
,但该名称没有在任何位置定义。在当前源代码中http://code.google.com/p/pyprocessing/source/browse/trunk/pyprocessing/flippolicy.py,现在有定义c_int
的线from ctypes import *
。此更改也出现在最新版本1.3.22中。你能升级后再试一次吗?