【问题标题】:Toolchain Build error - commandnotfound python工具链构建错误 - commandnotfound python
【发布时间】:2022-11-07 02:03:03
【问题描述】:

这是我第一次创建线程,希望我不会犯任何错误。 通常我可以在现有线程上找到我的问题的答案,但这次我找不到解决方案。

我正在用 python kivy 创建一个应用程序,我已经成功地用 buildozer 创建了一个 apk。 但是,当我想将我的 python kivy 转换为 xcode 项目时,我在工具链构建中遇到了一个令人困惑的错误。

我使用工具链的指令是:build python3 kivy openssl 经过漫长的过程,我最终得到以下错误代码。

我不明白错误消息,因为我在我的 mac 上安装了 python 并且是最新的。 有谁知道这可能是什么问题?我真的希望你这样做。 我已经尝试卸载并重新安装 python 希望它能修复它,但它没有。

错误代码:

IOSSFB % toolchain build python3 kivy openssl
[INFO    ] Building with 4 processes, where supported
[INFO    ] Want to build ['python3', 'kivy', 'openssl']
[INFO    ] Using the bundled version for recipe 'python3'
[INFO    ] Loaded recipe python3 (depends of ['hostpython3', 'libffi', 'openssl'], optional are [])
[INFO    ] Using the bundled version for recipe 'kivy'
[INFO    ] Loaded recipe kivy (depends of ['sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'ios', 'pyobjus', 'python', 'host_setuptools3'], optional are [])
[INFO    ] Using the bundled version for recipe 'openssl'
[INFO    ] Loaded recipe openssl (depends of [], optional are [])
[INFO    ] Using the bundled version for recipe 'hostpython3'
[INFO    ] Loaded recipe hostpython3 (depends of ['hostopenssl'], optional are [])
[INFO    ] Using the bundled version for recipe 'libffi'
[INFO    ] Loaded recipe libffi (depends of [], optional are [])
[INFO    ] Using the bundled version for recipe 'sdl2'
[INFO    ] Loaded recipe sdl2 (depends of [], optional are [])
[INFO    ] Using the bundled version for recipe 'sdl2_image'
[INFO    ] Loaded recipe sdl2_image (depends of ['sdl2'], optional are [])
[INFO    ] Using the bundled version for recipe 'sdl2_mixer'
[INFO    ] Loaded recipe sdl2_mixer (depends of ['sdl2'], optional are [])
[INFO    ] Using the bundled version for recipe 'sdl2_ttf'
[INFO    ] Loaded recipe sdl2_ttf (depends of ['sdl2', 'freetype'], optional are [])
[INFO    ] Using the bundled version for recipe 'ios'
[INFO    ] Loaded recipe ios (depends of ['python'], optional are [])
[INFO    ] Using the bundled version for recipe 'pyobjus'
[INFO    ] Loaded recipe pyobjus (depends of ['python'], optional are [])
[INFO    ] Using the bundled version for recipe 'python'
[INFO    ] Loaded recipe python (depends of ['python3'], optional are [])
[INFO    ] Using the bundled version for recipe 'host_setuptools3'
[INFO    ] Loaded recipe host_setuptools3 (depends of ['openssl', 'hostpython3', 'python3'], optional are [])
[INFO    ] Using the bundled version for recipe 'hostopenssl'
[INFO    ] Loaded recipe hostopenssl (depends of [], optional are [])
[INFO    ] Using the bundled version for recipe 'freetype'
[INFO    ] Loaded recipe freetype (depends of [], optional are [])
[INFO    ] Build order is ['freetype', 'hostopenssl', 'libffi', 'openssl', 'sdl2', 'hostpython3', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3', 'host_setuptools3', 'python', 'ios', 'pyobjus', 'kivy']
[INFO    ] Using the bundled version for recipe 'freetype'
[INFO    ] Using the bundled version for recipe 'hostopenssl'
[INFO    ] Using the bundled version for recipe 'libffi'
[INFO    ] Using the bundled version for recipe 'openssl'
[INFO    ] Using the bundled version for recipe 'sdl2'
[INFO    ] Using the bundled version for recipe 'hostpython3'
[INFO    ] Using the bundled version for recipe 'sdl2_image'
[INFO    ] Using the bundled version for recipe 'sdl2_mixer'
[INFO    ] Using the bundled version for recipe 'sdl2_ttf'
[INFO    ] Using the bundled version for recipe 'python3'
[INFO    ] Using the bundled version for recipe 'host_setuptools3'
[INFO    ] Using the bundled version for recipe 'python'
[INFO    ] Using the bundled version for recipe 'ios'
[INFO    ] Using the bundled version for recipe 'pyobjus'
[INFO    ] Using the bundled version for recipe 'kivy'
[INFO    ] Recipe order is ['freetype', 'hostopenssl', 'libffi', 'openssl', 'sdl2', 'hostpython3', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3', 'host_setuptools3', 'ios', 'pyobjus', 'kivy']
[INFO    ] Include dir added: {arch.arch}/freetype
[INFO    ] Include dir added: {arch.arch}/ffi
[INFO    ] Include dir added: {arch.arch}/openssl
[INFO    ] Include dir added: common/sdl2
[INFO    ] Global: hostpython located at /Users/fma/Desktop/IOSSFB/dist/hostpython3/bin/python
[INFO    ] Global: hostpgen located at /Users/fma/Desktop/IOSSFB/dist/hostpython3/bin/pgen
[INFO    ] Include dir added: common/sdl2_image
[INFO    ] Include dir added: common/sdl2_mixer
[INFO    ] Include dir added: common/sdl2_ttf
[DEBUG   ] Cached result: Download freetype. Ignoring
[DEBUG   ] Cached result: Extract freetype. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites freetype. Ignoring
[DEBUG   ] Cached result: Build_all freetype. Ignoring
[DEBUG   ] Cached result: Download hostopenssl. Ignoring
[DEBUG   ] Cached result: Extract hostopenssl. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites hostopenssl. Ignoring
[DEBUG   ] Cached result: Build_all hostopenssl. Ignoring
[DEBUG   ] Cached result: Download libffi. Ignoring
[DEBUG   ] Cached result: Extract libffi. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites libffi. Ignoring
[DEBUG   ] Cached result: Build_all libffi. Ignoring
[DEBUG   ] Cached result: Download openssl. Ignoring
[DEBUG   ] Cached result: Extract openssl. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites openssl. Ignoring
[DEBUG   ] Cached result: Build_all openssl. Ignoring
[DEBUG   ] Cached result: Download sdl2. Ignoring
[DEBUG   ] Cached result: Extract sdl2. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites sdl2. Ignoring
[DEBUG   ] Cached result: Build_all sdl2. Ignoring
[DEBUG   ] Cached result: Download hostpython3. Ignoring
[DEBUG   ] Cached result: Extract hostpython3. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites hostpython3. Ignoring
[DEBUG   ] Cached result: Build_all hostpython3. Ignoring
[DEBUG   ] Cached result: Download sdl2_image. Ignoring
[DEBUG   ] Cached result: Extract sdl2_image. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites sdl2_image. Ignoring
[DEBUG   ] Cached result: Build_all sdl2_image. Ignoring
[DEBUG   ] Cached result: Download sdl2_mixer. Ignoring
[DEBUG   ] Cached result: Extract sdl2_mixer. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites sdl2_mixer. Ignoring
[DEBUG   ] Cached result: Build_all sdl2_mixer. Ignoring
[DEBUG   ] Cached result: Download sdl2_ttf. Ignoring
[DEBUG   ] Cached result: Extract sdl2_ttf. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites sdl2_ttf. Ignoring
[DEBUG   ] Cached result: Build_all sdl2_ttf. Ignoring
[DEBUG   ] Cached result: Download python3. Ignoring
[DEBUG   ] Cached result: Extract python3. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites python3. Ignoring
[DEBUG   ] Cached result: Build_all python3. Ignoring
[DEBUG   ] Cached result: Download host_setuptools3. Ignoring
[DEBUG   ] Cached result: Extract host_setuptools3. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites host_setuptools3. Ignoring
[DEBUG   ] Cached result: Build_all host_setuptools3. Ignoring
[DEBUG   ] Cached result: Download ios. Ignoring
[DEBUG   ] Cached result: Extract ios. Ignoring
[DEBUG   ] Cached result: Install_hostpython_prerequisites ios. Ignoring
[INFO    ] Build_all ios
[INFO    ] Build ios for x86_64, arm64 (filtered)
[INFO    ] Build ios
[WARNING ] ios build for x86_64 has been incomplete
[WARNING ] Warning: deleting the build and restarting.
[INFO    ] Prebuild ios for x86_64
[DEBUG   ] Invoking prebuild_x86_64
[INFO    ] Build ios for x86_64
[INFO    ] CC and CXX will not use ccache
[INFO    ] Cythonize ios.pyx
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/toolchain", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1555, in main
    ToolchainCL()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1299, in __init__
    getattr(self, args.command)()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1368, in build
    build_recipes(args.recipe, ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1142, in build_recipes
    recipe.execute()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 704, in execute
    self.build_all()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 74, in _cache_execution
    f(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 803, in build_all
    self.build(arch)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 74, in _cache_execution
    f(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 790, in build
    self.build_arch(arch)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1094, in build_arch
    self.cythonize_build()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1067, in cythonize_build
    self.cythonize_file(join(root, filename))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kivy_ios/toolchain.py", line 1059, in cythonize_file
    shprint(sh.python, cythonize_script, filename)
  File "/Users/fma/Library/Python/3.10/lib/python/site-packages/sh.py", line 3548, in __getattr__
    return self.__env[name]
  File "/Users/fma/Library/Python/3.10/lib/python/site-packages/sh.py", line 3330, in __getitem__
    raise CommandNotFound(k)
sh.CommandNotFound: python

【问题讨论】:

    标签: python ios kivy


    【解决方案1】:

    我也有同样的问题。您已经找到解决方案了吗?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-03-28
    • 2022-08-16
    • 2017-03-14
    • 2012-03-27
    • 2017-03-18
    • 1970-01-01
    • 2017-01-31
    相关资源
    最近更新 更多