[在buildozer中为Android构建以sympy实现的python程序仍然困扰着我。我已经多次尝试在buildozer要求中指定mpmath和sympy,得到了相同的错误消息:
"install mpmath version >=0.19".
如何安装sympy作为buildozer的要求?
已知sympy
配方已损坏,并在BROKEN_RECIPES_PYTHON3 set in python-for-android中列出。
原因似乎是依赖性排序问题。从https://docs.sympy.org/latest/install.html:
SymPy确实需要安装mpmath Python库first
并且来自Ohad的构建日志:
[INFO]: Found a single valid recipe set: ['hostpython3', 'libffi', 'mpmath', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'sympy', 'six', 'pyjnius', 'android', 'kivy']
[INFO]: Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'sympy', 'six', 'pyjnius', 'android', 'kivy']
[INFO]: Dist will also contain modules (certifi, mpmath) installed from pip
[INFO]: Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'sympy', 'six', 'pyjnius', 'android', 'kivy']
[INFO]: The requirements (certifi, mpmath) were not found as recipes, they will be installed with pip.
因此,Buildozer将尝试先安装所有可用的配方,然后才尝试使用pip安装SymPy的mpmath依赖项。
一个解决方案可能是为mpmath添加一个构建配方,以确保您首先构建了一个:https://buildozer.readthedocs.io/en/latest/contribute.html#write-your-own-recipe