問題描述
我正在嘗試讓 kivy 在我的 Ubuntu 系統(tǒng)上運(yùn)行.我按照他們的 wesbite 中的說明進(jìn)行操作.
I am trying to make kivy work on my Ubuntu system. I followed the instructions from their wesbite.
但是當(dāng)我嘗試從他們的網(wǎng)站運(yùn)行以下 hello world 代碼時(shí):
But when I try to run the following hello world code from their website:
import kivy
kivy.require('1.5.1') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.button import Button
class MyApp(App):
def build(self):
return Button(text='Hello World')
if __name__ == '__main__':
MyApp().run()
我收到以下錯(cuò)誤:
[INFO ] Kivy v1.5.1
[INFO ] [Logger ] Record log in /home/malik/.kivy/logs/kivy_13-03-08_6.txt
[INFO ] [Factory ] 137 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[INFO ] [Text ] using <pygame> as text provider
[DEBUG ] [App ] Loading kv <./my.kv>
[DEBUG ] [App ] kv <./my.kv> not found
[INFO ] [Window ] using <pygame> as window provider
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 138 (ATIFGLEXTENSION)
Minor opcode of failed request: 66 ()
Serial number of failed request: 14
Current serial number in output stream: 14
跟我的顯卡有關(guān)系嗎?我正在使用 ATI Mobility Radeon HD 5400 顯卡.
Has it something to do with my graphics card? I am using ATI Mobility Radeon HD 5400 graphics card.
推薦答案
終于通過將 Ubuntu 更新到 12.10 讓它工作了 似乎問題出在圖形驅(qū)動程序上.現(xiàn)在該示例按預(yù)期工作.謝謝瓊杰和qua-non.
Finally got it working by updating Ubuntu to 12.10 Seems like the issue was the graphics driver. Now the example is working as expected. Thanks Qiongjie and qua-non.
這篇關(guān)于Kivy你好世界不工作的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!