了解到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()