NumPy乱搞CX_Freeze吗?

时间:2013-08-19 19:36:41

标签: python numpy cx-freeze

我试图运行一个已编码的冻结python游戏但是当我尝试运行exe时出现错误。我相信它是因为NumPy,但我不太确定。这是错误:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27
, in <module>
    exec code in m.__dict__
  File "game.py", line 1, in <module>
  File "C:\Python27\lib\site-packages\pygame\__init__.py", line 251, in <module>

    try: import pygame.surfarray
  File "C:\Python27\lib\site-packages\pygame\surfarray.py", line 69, in <module>

    import pygame._numpysurfarray as numpysf
  File "C:\Python27\lib\site-packages\pygame\_numpysurfarray.py", line 48, in <m
odule>
    import numpy
  File "C:\Python27\lib\site-packages\numpy\__init__.py", line 147, in <module>
    from core import *
AttributeError: 'module' object has no attribute 'sys'

有谁知道这里发生了什么因为我无法弄明白? 任何帮助将不胜感激!

提前致谢,Nate

1 个答案:

答案 0 :(得分:1)

这是cx_Freeze中的一个错误,应该在开发版本中修复。

问题已在here讨论,此处为the pull request to fix it