为什么我使用py2app获取这些错误?

时间:2013-08-04 00:53:10

标签: python ios macos compiler-construction py2app

下面是键入python setup.py py2app后出现的错误。我在Mac上。我花了几个小时阅读教程,确保设置了py2app和pyapplet,并且按照教程,我不知道什么是错的。这是错误:

running py2app
Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    setup_requires=['py2app'],
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.7.3-py2.6.egg/py2app/build_app.py", line 502, in run
    if sysconfig.get_config_var('PYTHONFRAMEWORK') is None:
AttributeError: 'NoneType' object has no attribute 'get_config_var'

这是我的setup.py

"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['kradio.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

程序和设置都位于用户目录中。

0 个答案:

没有答案