使用py2app启动Python3应用时出错

时间:2019-02-25 15:28:01

标签: python python-3.x macos py2app

最近,我构建了一个多文件Python3脚本,希望将其转换为macOS应用程序...我遇到了一个我决定尝试的名为py2app的程序。创建setup.py之后,我运行了“ python3 setup.py py2app”并获得了以下多个实例:

WARNING: ImportError in sip recipe ignored: No module named asn1crypto-0
WARNING: ImportError in sip recipe ignored: No module named clyent-1
WARNING: ImportError in sip recipe ignored: No module named ipywidgets-7

但是我认为这只是意味着它忽略了不需要的模块。 在运行结束时,出现此错误...

Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    setup_requires=['py2app'],
  File "/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 140, in setup
    return distutils.core.setup(**attrs)
  File "/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)

  File "/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/ash/coding/python/goarderApp/.eggs/py2app-0.18-py3.7.egg/py2app/build_app.py", line 838, in run
    self._run()
  File "/Users/ash/coding/python/goarderApp/.eggs/py2app-0.18-py3.7.egg/py2app/build_app.py", line 1053, in _run
    self.run_normal()
  File "/Users/ash/coding/python/goarderApp/.eggs/py2app-0.18-py3.7.egg/py2app/build_app.py", line 1165, in run_normal
    self.create_binaries(py_files, pkgdirs, extensions, loader_files)
  File "/Users/ash/coding/python/goarderApp/.eggs/py2app-0.18-py3.7.egg/py2app/build_app.py", line 1516, in create_binaries
    mm.mm.run_file(runtime)
  File "/Users/ash/coding/python/goarderApp/.eggs/macholib-1.11-py3.7.egg/macholib/MachOGraph.py", line 86, in run_file
    raise ValueError('%r does not exist' % (pathname,))
ValueError: '/anaconda3/lib/libpython3.7.dylib' does not exist

我认为这是造成我主要问题的原因...当我尝试运行输出的.app时,出现一个错误,提示未检测到运行时,并迫使我终止执行。

任何对此的帮助将不胜感激。 谢谢。

0 个答案:

没有答案