"KeyError: kivy.garden.matplotlib"

576 views
Skip to first unread message

Alfred Noodle

unread,
May 10, 2022, 7:11:31 PM5/10/22
to Kivy users support
I'm getting "KeyError: kivy.garden.matplotlib" even though I've installed it. I have more info here. https://stackoverflow.com/questions/72193484/keyerror-kivy-garden-matplotlib

Robert

unread,
May 10, 2022, 8:51:55 PM5/10/22
to Kivy users support
Never trust some random YouTube video, YouTube imparts confidence not competence.
The only thing you care about is the documentation and examples.



So matplotlib has bit rot, and you are on your own. (be suspicious of everything)


The easiest think to do is copy matplotlib to your app, you just need a directory (say garden_matplotlib)  with the two ,py (you will have to fixup the imports on the two .py) and import this in your app.
There may be two obsolete and redundant imports - I don't remember where.
You can debug this on your desktop and there will be no special Garden requirements for Buildozer (just  matplotlib recipe dependency which is not the matplotlib in Garden)

Alfred Noodle

unread,
May 10, 2022, 9:20:18 PM5/10/22
to Kivy users support
What do you mean "two.py"? 

Robert

unread,
May 10, 2022, 9:27:59 PM5/10/22
to Kivy users support
The two .py files , the answer to your same question on Discord points you to an example that does this.

Alfred Noodle

unread,
May 10, 2022, 9:44:28 PM5/10/22
to Kivy users support
That's what I thought you meant, just making sure. So you're saying that within project_folder, I'll have another folder, garden_matplotlib that will have the two .py files and this github copy of matplotlib?  Would I put main.py in project folder, still? And you're thinking that maybe in the main.py application, I import the entire folder garden_matplotlib? That doesn't make sense to me because I think you can only import python modules in a .py application.  I've never imported a folder with mixed files in it. 

Robert

unread,
May 10, 2022, 10:25:05 PM5/10/22
to Kivy users support
Just try a test case on the desktop, you'll figure it out.

Alfred Noodle

unread,
May 11, 2022, 12:24:28 PM5/11/22
to Kivy users support
Oh that was easy. I didn't know it worked like that.  K, thanks.  So basically, programming is just like assembling modules from github? 

Robert

unread,
May 11, 2022, 1:30:05 PM5/11/22
to Kivy users support
HaHa if only.
Reply all
Reply to author
Forward
0 new messages