Reputation:
I just started on kivy recently but when I import from kivy.garden.graph import MeshLinePlot it gives an error
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from kivy.garden.graph import MeshLinePlot
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 640, in _load_backward_compatible
KeyError: 'kivy.garden.graph'
I have installed Kivy using there installation guide for windows https://kivy.org/doc/stable/installation/installation-windows.html
Upvotes: 4
Views: 9898
Reputation: 193
If you find the above error in the Android log file when trying to compile deploy and run the Kivy app on Android using buildozer, then try this solution: https://github.com/kivy/buildozer/issues/1226
And remember to put matplotlib in the buildozer.spec requirements. Something like this, depending on your specific needs:
requirements = python3,kivy,pillow,matplotlib
Upvotes: 0
Reputation: 248
They have changed the installation method to pip install kivy_garden.graph
https://github.com/kivy-garden/graph
You should execute this, and then proceed to %python\Lib\site-packages\kivy_garden
Copy the \graph
folder inside to this directory %python\Lib\site-packages\kivy\garden
This solved the issue for me.
Upvotes: 4
Reputation: 131
You should install matplotlib if you didn´t
if the above doesn't work or still output Key Error kivy.garden.matplotlib
You should type the following in your command window
garden install matplotlib
I have already installed it you can view the picture here am using matplotlib 3.1.1 python 3.7
Upvotes: 4
Reputation: 714
You need to install kivy-garden module first:
pip install kivy-garden
Then install graph package from garden module:
garden install graph
See https://kivy.org/doc/stable/api-kivy.garden.html
Upvotes: 5