瞭解到Instgram,知乎等APP是用python寫的。我也決定學習用python寫APP。這裏咱們須要安裝kivy。html
環境:win7,python3.6python
安裝方式:DOS命令窗口windows
注意事項:目前不支持python3.4及以上版本。如需安裝3.5及以上版本,請經過安裝文件手動安裝。app
參考kivy網址安裝(全英文):https://kivy.org/doc/stable/installation/installation-windows.htmlide
1. 確保升級pip 和wheel學習
python -m pip install --upgrade pip wheel setuptools
2. 安裝依賴包ui
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew python -m pip install kivy.deps.gstreamer
python -m pip install kivy.deps.angle \\python3.5須要安裝此項
3. 安裝kivyspa
python -m pip install kivy
4. 安裝kivy示例code
python -m pip install kivy_examples
5. 驗證kivy安裝htm
在python開發環境中,編輯以下代碼:
1 from kivy.app import App 2 from kivy.uix.button import Button 3 4 class TestApp(App): 5 def build(self): 6 return Button(text="hello") 7 8 TextApp().run()