我正在尝试使用Pong App的buildozer制作一个apk文件(https://kivy.org/doc/stable/tutorials/pong.html)
然而,我在运行buildozer的最后一步时遇到了以下错误。
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in <module>
load_entry_point('buildozer==0.38.dev0', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python2.7/dist-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1053, in run_command
targets = [x[0] for x in self.targets()]
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 945, in targets
fromlist=['buildozer'])
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android_new.py", line 10, in <module>
from buildozer.targets.android import TargetAndroid
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 28, in <module>
import sh
ImportError: No module named sh
请让我知道继续使apk文件的解决方案
参考:https://kivy.org/doc/stable/guide/packaging-android.html
因此,Buidozer在查找sh包时似乎遇到了问题。看看https://www.pythonforbeginners.com/modules-in-python/how-to-use-sh-in-python.别难过,我在Buildozer也有过类似的经历。