尽管我已经安装了pip并在cmd中导入了kivy,但是仍然出现错误,并且代码未执行

时间:2020-03-09 12:28:14

标签: python android visual-studio-2010 pip kivy

from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
    def build(self):
        return Button(text='Hello World')

TestApp().run()

跟踪:

Traceback (most recent call last):
  File "c:\Users\HYPER\Desktop\training.py\from kivy.app import App.py", line 1, in <module>
    from kivy.app import App
  File "c:\Users\HYPER\Desktop\training.py\kivy.py", line 2, in <module>
    kivy.require('1.9.0')`enter code here`
AttributeError: module 'kivy' has no attribute 'require'

[Done] exited with code=1 in 4.102 seconds

0 个答案:

没有答案