1

如果我运行命令:

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。请帮忙。

4

0 回答 0