You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to package an Android app from Python using Buildozer. My app uses SymPy, and during the build process, I encounter the following error:
STDOUT:
Please install the mpmath package with a version >= 0.19
I found a solution that involves manually copying the mpmath folder, which allowed the build to continue. However, when I run the app, it starts but then crashes with the following error:
Traceback (most recent call last):
File "/home/abdo/my_venv/.buildozer/android/app/main.py", line 98, in equation
File "/home/abdo/my_venv/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86/build/python-installs/Balancer2/x86/sympy/init.py", line 57, in<module>
File "/home/abdo/my_venv/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86/build/python-installs/Balancer2/x86/sympy/core/init.py", line 6, in<module>
File "/home/abdo/my_venv/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86/build/python-installs/Balancer2/x86/sympy/core/basic.py", line 3, in<module>
ImportError: cannot import name 'Mapping' from 'collections' (/data/user/0/org.balancer.balancer2/files/app/_python_bundle/stdlib.zip/collections/init.pyc)
I understand that Mapping has moved from collections to collections.abc, but despite my modifications to import Mapping from collections.abc, the error persists.
I have attempted the following:
Manually copying the mpmath folder to the appropriate location.
Building the project without SymPy first, then adding SymPy and mpmath.
Specifying an older Python version in buildozer.spec.
Using older versions of SymPy and python-for-android.
None of these steps have resolved the issue. It appears that Buildozer defaults to using the latest Python version regardless of the specified version.
buildozer.spec
Command:
// REPLACE ME: buildozer command ran? e.g. buildozer android debug
STDOUT:
Please install the mpmath package with a version >= 0.19
second
raceback (most recent call last):
File "/home/abdo/my_venv/.buildozer/android/app/main.py", line 98, in equation
File "/home/abdo/my_venv/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86/build/python-installs/Balancer2/x86/sympy/__init__.py", line 57, in <module>
File "/home/abdo/my_venv/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86/build/python-installs/Balancer2/x86/sympy/core/__init__.py", line 6, in <module>
File "/home/abdo/my_venv/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86/build/python-installs/Balancer2/x86/sympy/core/basic.py", line 3, in <module>
ImportError: cannot import name 'Mapping' from 'collections' (/data/user/0/org.balancer.balancer2/files/app/_python_bundle/stdlib.zip/collections/__init__.pyc)
The text was updated successfully, but these errors were encountered:
1-Manually copying the mpmath folder to the appropriate location.
2-Building the project without SymPy first, then adding SymPy and mpmath.
3-Specifying an older Python version in buildozer.spec.
4-Using older versions of SymPy and python-for-android.
Versions
Description
I am trying to package an Android app from Python using Buildozer. My app uses SymPy, and during the build process, I encounter the following error:
STDOUT: Please install the mpmath package with a version >= 0.19
I found a solution that involves manually copying the mpmath folder, which allowed the build to continue. However, when I run the app, it starts but then crashes with the following error:
I understand that
Mapping
has moved fromcollections
tocollections.abc
, but despite my modifications to importMapping
fromcollections.abc
, the error persists.I have attempted the following:
mpmath
folder to the appropriate location.buildozer.spec
.None of these steps have resolved the issue. It appears that Buildozer defaults to using the latest Python version regardless of the specified version.
buildozer.spec
Command:
Spec file:
Logs
first one
second
The text was updated successfully, but these errors were encountered: