Traceback from CX_Freeze doesn't make sense

老子叫甜甜 提交于 2019-12-13 07:42:40

问题


I've been trying to get my python script distributed to other for a while now, have tried py2app etc. Finally seem to have made the most progress with CX_Freeze. It completes building the app with a simple helloworld wxpython script from cx_freeze but fails with my script. It fails with this traceback:

running bdist_dmg
running bdist_mac
running build
running build_exe
creating directory build/exe.macosx-10.5-x86_64-2.7
copying //anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/bases/Console -> build/exe.macosx-10.5-x86_64-2.7/FirstProduction
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    executables=executables
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/dist.py", line 362, in setup
    distutils.core.setup(**attrs)
  File "//anaconda/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "//anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/macdist.py", line 58, in run
    self.run_command('bdist_mac')
  File "//anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/macdist.py", line 226, in run
    self.run_command('build')
  File "//anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "//anaconda/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "//anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/dist.py", line 232, in run
    freezer.Freeze()
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/freezer.py", line 610, in Freeze
    self.compress, self.copyDependentFiles)
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/freezer.py", line 510, in _WriteModules
    module.Create(finder)
  File "//anaconda/lib/python2.7/site-packages/cx_Freeze-4.3.3-py2.7-macosx-10.5-x86_64.egg/cx_Freeze/freezer.py", line 746, in Create
    module.file, module.name)
cx_Freeze.freezer.ConfigError: no file named sys (for module boto.compat.sys)

When I run setup.py on the other script supplied by cx_freeze team it builds fine, here is part of the traceback:

/MacOS
create_plist()
setRelativeReferencePaths()
prepare_qt_app()
buildDMG()
................................................................
created: /Users/Bailejor/Desktop/build/hello-0.1.dmg

Any insight would be fantastic!

来源:https://stackoverflow.com/questions/28685401/traceback-from-cx-freeze-doesnt-make-sense

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!