Traceback (most recent call last): File "./Scripts/version.py", line 6, in <module>
from Foundation import NSMutableDictionary File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/Foundation/__init__.py", line 8, in <module>
import objc as _objc File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/__init__.py", line 30, in <module>
from objc._bridgesupport import * File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 9, in <module>
import pkg_resources File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 698, in <module>
class Environment(object): File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 701, in Environment
def __init__(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR): File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 96, in get_supported_platform
plat = get_build_platform(); m = macosVersionString.match(plat) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 222, in get_build_platform
plat = get_platform() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/util.py", line 98, in get_platform File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 498, in get_config_vars File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py", line 407, in _init_posix distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.7" but "10.8" during configure Command /bin/sh failed with exit code 1
我正在使用python脚本对TestFlight进行版本控制。建设时我遇到了一些错误。我对python一无所知。这有什么问题?
答案 0 :(得分:1)
这似乎是信息的关键部分:
$ MACOSX_DEPLOYMENT_TARGET不匹配:现在“10.7”但“10.8”期间 配置
您使用的是什么工具集是在Mountain Lion下配置的,但现在在Lion下运行,但您声称相反。
您没有指定正在使用的工具集,但看起来您将不得不在新的操作系统下重新设置它。
答案 1 :(得分:1)
这有点不稳定,但如果您编辑.bash_profile并添加:
导出MACOSX_DEPLOYMENT_TARGET = 10.8
你应该没问题。在尝试进行审核后,我遇到了同样的问题。
答案 2 :(得分:0)
我找到了解决方案,进入你的/System/Library/Frameworks/Python.framework/Versions/2.7/lib/distutils/sysconfig.py
转到第408行,说“提出DistutilsPlatformError”并添加一个'#'来注释掉那行代码......这将“释放python”
你基本上是在告诉python“不要担心它不是10.7,我知道”结果可能会有一些崩溃,但我认为不然。我非常复杂的python应用程序现在可以在MacOSX 10.8上编译而没有任何麻烦,它似乎可以完成这项工作,QA仍然需要测试它。
我使用的是MacBookPro 2012 MacOSX 10.8