1

尝试运行Python 2.7 中在此处找到的基本示例 Pyprocessing 脚本时,我收到以下错误消息。知道是什么原因造成的吗?

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
4

1 回答 1

2

这看起来像 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 中。你可以升级并再试一次吗?

于 2013-02-08T15:50:39.020 回答