问题描述
尝试在 Windows 10 中安装 Kivy.安装基础使用
Tried installing Kivy in Windows 10. Install the basics using
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew --extra-index-url https://kivy.org/downloads/packages/simple
python -m pip install kivy
它适用于一项测试Hello World.然后我尝试安装 gstreamer,然后开始出现错误.
It worked for one test "Hello World. I then tried installing gstreamer and then started getting errors.
[INFO ] [Logger ] Record log in C:UsersBen.kivylogskivy_16-01-11_7.txt
[INFO ] [Kivy ] v1.9.1
[INFO ] [Python ] v2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
[INFO ] [Factory ] 179 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[CRITICAL ] [Text ] Unable to find any valuable Text provider at all!
sdl2 - ImportError: DLL load failed: The specified procedure could not be found.
File "C:Python27libsite-packageskivycore\__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "C:Python27libsite-packageskivycore ext ext_sdl2.py", line 12, in <module>
from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents,
pil - ImportError: No module named PIL
File "C:Python27libsite-packageskivycore\__init__.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "C:Python27libsite-packageskivycore ext ext_pil.py", line 8, in <module>
from PIL import Image, ImageFont, ImageDraw
[CRITICAL ] [App ] Unable to get a Text provider, abort.
试图找到 PIL 并使用 python -m pip install image
Tried to find PIL and used python -m pip install image
python -m pip install image
现在,当我运行 main.py 时,我得到了 Kivy 窗口的黑匣子,里面什么都没有,还有一个新错误
Now when I run my main.py I get the black box of a Kivy window, nothing inside, and a new error
[INFO ] [Logger ] Record log in C:UsersBen.kivylogskivy_16-01-11_11.txt
[INFO ] [Kivy ] v1.9.1
[INFO ] [Python ] v2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
[INFO ] [Factory ] 179 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[INFO ] [OSC ] using <thread> for socket
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] OpenGL version <4.5.0 NVIDIA 358.91>
[INFO ] [GL ] OpenGL vendor <NVIDIA Corporation>
[INFO ] [GL ] OpenGL renderer <GeForce GTX 780/PCIe/SSE2>
[INFO ] [GL ] OpenGL parsed version: 4, 5
[INFO ] [GL ] Shading version <4.50 NVIDIA>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Base ] Start application main loop
[INFO ] [GL ] NPOT texture support is available
Exception Exception: Exception('tostring() has been removed. Please call tobytes() instead.',) in 'kivy.graphics.instructions.Ren
derContext.set_texture' ignored
不禁觉得我的安装变砖了,不知道如何从头开始.任何帮助表示赞赏.
Can't help but feel I bricked my install and no idea how to start from scratch. Any help is appreciated.
谢谢!
推荐答案
如果 Kivy 及其依赖项最终完全卸载.
Ended up with a full uninstall if Kivy and its dependencies.
python -m pip uninstall kivy
python -m pip uninstall kivy.deps.sdl2
python -m pip uninstall kivy.deps.glew
python -m pip uninstall kivy.deps.gstreamer
python -m pip uninstall image
由于问题是在gstreamer之后出现的,我在重新安装时再次避免
Since the problem came after gstreamer, I avoided again on reinstall
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
--extra-index-url https://kivy.org/downloads/packages/simple/
python -m pip install kivy
之后就可以正常运行了(暂时:D)
After that was able to run things as normal (for now :D )
我希望这可以帮助那些在 Windows 10 上遇到 Kivy 问题的人
I hope this helps someone out there with Kivy issues on Windows 10
这篇关于Kivy 安装出错 - Windows 10(正在工作,现在不在 gstreamer 之后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!