尝试在Python 2.7中运行基本示例Pyprocessing脚本here,我收到以下错误消息。有什么想法导致它?
Traceback (most recent call last):
File "C:\Users\erez\Documents\Robin\scripts\Python\networkx-eg1.py", line 10, in <module>
run()
File "C:\Python27\lib\site-packages\pyprocessing-0.1.2.7-py2.7.egg\pyprocessing\__init__.py", line 383, in run
pyglet.app.run()
File "C:\Python27\lib\site-packages\pyglet\app\__init__.py", line 123, in run
event_loop.run()
File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 135, in run
self._run_estimated()
File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 164, in _run_estimated
timeout = self.idle()
File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 280, in idle
window.flip()
File "C:\Python27\lib\site-packages\pyprocessing-0.1.2.7-py2.7.egg\pyprocessing\flippolicy.py", line 149, in flip
currentpos = (c_int*2)(0)
NameError: global name 'c_int' is not defined
答案 0 :(得分:1)
这看起来像是pyprocessing中的一个错误。您使用的是版本1.2.7,在该版本中,文件flippolicy.py
引用c_int
,但该名称未在任何位置定义。在http://code.google.com/p/pyprocessing/source/browse/trunk/pyprocessing/flippolicy.py的当前源代码中,现在有一行from ctypes import *
,它定义了c_int
。此更改也在最新版本1.3.22中。你可以升级并重试吗?