1.确保你安装了最新版本的pip和wheel
python -m pip install --upgrade pip wheel setuptools
2.安装依赖
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install docutils pygments pypiwin32
python -m pip install kivy.deps.sdl2 kivy.deps.glew #python3.8出错
python -m pip install kivy.deps.gstreamer#python3.8出错
如果遇到内存错误,就在后面加上
–no-cache-dir.
如果安装的python版本大于3.5,那么可以用下面的代替kivy.deps.glew:#不安装会有问题 Unable to get a Window, abort.
python -m pip install kivy.deps.angle
可在下载kivy_deps.gstreamer-0.1.17-cp37-cp37m-win_amd64.whl 后安装
python -m pip install kivy_deps.gstreamer-0.1.17-cp37-cp37m-win_amd64.whl
python2.7下载 cp27 python3.6下载cp36 python3.7下载cp37
3.安装kivy
python -m pip install kivy
4安装demo
python -m pip install kivy_examples
安装目录在 python**share中
5运行demo
python c:python37sharekivy-examplesdemoshowcasemain.py
如遇到python.exe 无法定位 程序输入点 inflatereset2于动态链接库 libpng16-16.dll(Python kivy entry point inflateRest2 could not be located libpng16-16.dll)
windows 10 复制zlib1.dll从C:WindowsSysWOW64 到 C:WindowsSystem32(Windows10. copy zlib1.dll from C:WindowsSysWOW64 to C:WindowsSystem32)
C:WindowsSystem32中的zlib1.dll可以先备份下
华旅网络 |