KeyError:'kivy.garden.graph'

问题描述 投票:0回答:1

我刚刚开始使用kivy但是当我从kivy.garden.graph导入导入MeshLinePlot时出现错误

 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'

我已经安装了Kivy使用windows https://kivy.org/doc/stable/installation/installation-windows.html的安装指南

python kivy python-3.7
1个回答
0
投票

您需要先安装kivy-garden模块:

pip install kivy-garden

然后从园区模块安装图形包:

garden install graph

https://kivy.org/doc/stable/api-kivy.garden.html

© www.soinside.com 2019 - 2024. All rights reserved.