Closed rondan100 closed 4 years ago
to me it looks like garden.matplotlib
has bit rot.
In https://buildozer.readthedocs.io/en/latest/specifications.html in the "garden_requirements" section it says:
Please note that if it doesn’t work, it might be because of the garden package itself. Refer to the author of the package if he already tested it on your target platform, not us.
Which to me looks like finger pointing, and was not helpful to me.
You can however make a local copy of garden.matplotlib and handcraft.... here are my notes from a previous project.
# 0) It appers garden.matplotlib has bit rot
# See https://buildozer.readthedocs.io/en/latest/specifications.html
# "garden_requirements"
#
# 1) copy the garden.matplotlib source to a folder
# say <project>/garden_matplotlib
#
# 2)garden.matplotlib expects an old version of matplotlib
# Comment lines 255,256 in garden_matplotlib/backend_kivy.py
#from matplotlib import _png
#from matplotlib import _path
#
# 3) in garden_matplotlib/__init__.py
# change 2 instances import kivy.garden.matplotlib to import garden_matplotlib
#
# 4) in garden_matplotlib/backend_kivyadd.py line 95
# change import kivy.garden.matplotlib to import garden_matplotlib
#
# 5) import into the app as garden_matplotlib, for example:
# from garden_matplotlib.backend_kivyagg import FigureCanvasKivyAgg
#
# 6) no extra buildozer requirements except for the usual matplotlib dependency
#
to me it looks like
garden.matplotlib
has bit rot. In https://buildozer.readthedocs.io/en/latest/specifications.html in the "garden_requirements" section it says:Please note that if it doesn’t work, it might be because of the garden package itself. Refer to the author of the package if he already tested it on your target platform, not us.
Which to me looks like finger pointing, and was not helpful to me.
You can however make a local copy of garden.matplotlib and handcraft.... here are my notes from a previous project.
# 0) It appers garden.matplotlib has bit rot # See https://buildozer.readthedocs.io/en/latest/specifications.html # "garden_requirements" # # 1) copy the garden.matplotlib source to a folder # say <project>/garden_matplotlib # # 2)garden.matplotlib expects an old version of matplotlib # Comment lines 255,256 in garden_matplotlib/backend_kivy.py #from matplotlib import _png #from matplotlib import _path # # 3) in garden_matplotlib/__init__.py # change 2 instances import kivy.garden.matplotlib to import garden_matplotlib # # 4) in garden_matplotlib/backend_kivyadd.py line 95 # change import kivy.garden.matplotlib to import garden_matplotlib # # 5) import into the app as garden_matplotlib, for example: # from garden_matplotlib.backend_kivyagg import FigureCanvasKivyAgg # # 6) no extra buildozer requirements except for the usual matplotlib dependency #
This worked for me! Thank you very much.
Yes - it worked for me too! One small typing error: "backend_kivyadd.py" should be "backend_kivyagg.py". :-)
worked for me too thanks man !!
Hello, I am following the notes but the app still does not work in android. Can you please help me with the .spec file?
I didn't have used matplotlib recently on android - at least not since
buildozer has deprecated the garden_requirements
setting in
buildozer.spec.
The garden modules I recently had used were qrcode, xcamera and zbarcam and
I got them included in the app by adding the following to the
requirements
setting of buildozer.spec: kivy_garden.qrcode,
kivy_garden.xcamera, kivy_garden.zbarcam, ...
Please post a minumal example, your buildozer.spec file and the log of the error/crash message from your logcat android run for to get better help.
Am Do., 3. Dez. 2020 um 23:16 Uhr schrieb nikosjabbour < notifications@github.com>:
Hello, I am following the notes but the app still does not work in android. Can you please help me with the .spec file?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kivy/buildozer/issues/1226#issuecomment-738443761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4U63TA5ZOL6TNHB6DLPY3STAL33ANCNFSM4RLV2VYQ .
thanks its worked for me
First Step: 1.- pip install kivy-gargen 2.- garden install matplotlib
Then, use the stable version of matplotlib 3.- sudo apt-get install python3-matplotlib
On the following system I had to remove ccache to make it working, so it becomes this way: Linux: WSL2 Ubuntu 22.04.2 LTS Python: 3.10.6 Matplotlib: 3.7.1 Kivy: 2.1.1
0) It appers garden.matplotlib has bit rot, See https://buildozer.readthedocs.io/en/latest/specifications.html
1) copy the garden.matplotlib source to a folder say
But if I do sudo apt remove ccache , the building is not possible because it doesn't find the cache, and also the step 3 I don't know where that file is
4. app as About the 3 step, I don't find that file
Versions
Description
I want to plot graphic of matplotlib with command "from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg" in .py file. This command works in PC but not in Android.
buildozer.spec
Command:
Spec file:
Logs