Py2app无法使用随机数学模块

时间:2012-01-04 03:19:56

标签: python math random py2app

如果我运行命令:

python setup.py py2app

然后,我运行我的应用程序,我收到错误:

Traceback (most recent call last):
  File "/Users/jmeyer2k/Desktop/PixelBuild/Development/dist/PixelBuild.app/Contents/Resources/__boot__.py", line 31, in <module>
    _run('PixelBuild.py')
  File "/Users/jmeyer2k/Desktop/PixelBuild/Development/dist/PixelBuild.app/Contents/Resources/__boot__.py", line 28, in _run
    execfile(path, globals(), globals())
  File "/Users/jmeyer2k/Desktop/PixelBuild/Development/dist/PixelBuild.app/Contents/Resources/PixelBuild.py", line 7, in <module>
    import random
  File "/Users/jmeyer2k/Desktop/PixelBuild/Development/dist/PixelBuild.app/Contents/Resources/random.py", line 45, in <module>
    from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: cannot import name log

我假设它与随机模块和数学模块有关。我的第一个想法是在数据文件中包含数学模块,但我尝试了它仍然无法正常工作。我可能没有包含正确的文件。我包括:math.so。请帮忙。

0 个答案:

没有答案