我已使用工具链为iOS构建了我的kivy应用程序。在打开生成的xcode项目并开始构建过程后,我收到以下错误。
Listing '/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/stopwining.xcodeproj/xcuserdata/martinprater.xcuserdatad/xcschemes'...
/Users/martinprater/ios/stopwining-ios/YourApp/.buildozer/android/app/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
/Users/martinprater/ios/stopwining-ios/YourApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/stopwiningmobile/kivy/extras/highlight.py:45: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if len(sys.argv) is not 4:
/Users/martinprater/ios/stopwining-ios/YourApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/stopwiningmobile/kivy/uix/behaviors/focus.py:463: SyntaxWarning: "is" with a literal. Did you mean "=="?
walk_tree = 'walk' if focus_dir is 'focus_next' else 'walk_reverse'
/Users/martinprater/ios/stopwining-ios/YourApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/stopwiningmobile/kivy/uix/behaviors/focus.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
if focus_dir is 'focus_next':
/Users/martinprater/ios/stopwining-ios/YourApp/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/stopwiningmobile/kivy/uix/behaviors/knspace.py:460: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if parent_knspace is not 0:
/Users/martinprater/ios/stopwining-ios/YourApp/build/hostpython3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/hostpython3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/hostpython3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/python3/arm64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/python3/arm64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/python3/arm64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/python3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/python3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/build/python3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
/Users/martinprater/ios/stopwining-ios/YourApp/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/.buildozer/android/app/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/hostpython3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/hostpython3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/hostpython3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/python3/arm64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/python3/arm64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/python3/arm64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/python3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/python3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/build/python3/x86_64/Python-3.8.2/Lib/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/lib2to3/tests/data/py3_test_grammar.py:652: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 is 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/lib2to3/tests/data/py3_test_grammar.py:653: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/lib2to3/tests/data/py3_test_grammar.py:656: SyntaxWarning: "is" with a literal. Did you mean "=="?
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/dist/hostpython3/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
/Users/martinprater/ios/stopwining-ios/YourApp/stopwining-ios/YourApp/stopwining-ios/YourApp/lib/python3.8/site-packages/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
raise TypeError("%s and %s are not of the same version" (a, b))
Command PhaseScriptExecution failed with a nonzero exit code
在python版本中似乎不匹配。 直接从我的虚拟环境中运行编译脚本可以正常工作,
/Users/martinprater/ios/dist/hostpython3/bin/python -m compileall -f -b "$PROJECT_DIR"/YourApp
我尝试通过pyenv和预构建脚本在全球范围内设置Python环境,以使用Python 3.8.2强制实施。 但是,它似乎在Xcode(11.5)中没有生效。
我尝试过:
任何帮助都表示赞赏。 谢谢, 马丁
答案 0 :(得分:0)
为解决此问题,我们必须将 == 更改为 is
这是完整的博客https://adamj.eu/tech/2020/01/21/why-does-python-3-8-syntaxwarning-for-is-literal/