如何处理 Python 3.8 中的 Kivy 安装错误?

Ati*_*is 15 python python-3.x kivy windows-10 python-3.8

我已经从 Kivy 在 Python 中安装了所有必要的代码,但是我需要的最后一个是python -m pip install kivy给我一个这样的错误:

ERROR: Dependency for context.pyx not resolved: config.pxi
ERROR: Dependency for compiler.pyx not resolved: config.pxi
ERROR: Dependency for context_instructions.pyx not resolved: config.pxi
ERROR: Dependency for fbo.pyx not resolved: config.pxi
ERROR: Dependency for gl_instructions.pyx not resolved: config.pxi
ERROR: Dependency for instructions.pyx not resolved: config.pxi
ERROR: Dependency for opengl.pyx not resolved: config.pxi
ERROR: Dependency for opengl_utils.pyx not resolved: config.pxi
ERROR: Dependency for shader.pyx not resolved: config.pxi
ERROR: Dependency for stencil_instructions.pyx not resolved: config.pxi
ERROR: Dependency for scissor_instructions.pyx not resolved: config.pxi
ERROR: Dependency for texture.pyx not resolved: config.pxi
ERROR: Dependency for vbo.pyx not resolved: config.pxi
ERROR: Dependency for vertex.pyx not resolved: config.pxi
ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi
ERROR: Dependency for cgl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_mock.pyx not resolved: config.pxi
ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi
ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi
ERROR: Dependency for svg.pyx not resolved: config.pxi
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Run Code Online (Sandbox Code Playgroud)

我用的是windows 10,请帮忙!

小智 25

这对我有用:

马瑟姆 15 天前评论 我们不太可能发布 3.8 到 pypi 的 1.11.1 版本。但是,您可以使用以下命令安装 kivy master:

pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
Run Code Online (Sandbox Code Playgroud)


小智 7

尝试使用pip install kivy==2.0.0rc2pip install kivy==2.0.0rc1

命令: pip install kivy==2.0.0rc2

Windows 10 Pro和一起工作Python 3.8.3

我用这个代码测试它:

from kivy.app import App
from kivy.uix.button import Button
 
class TestApp(App):
    def build(self):
        return Button(text= " Hello Kivy World ")

TestApp().run()
Run Code Online (Sandbox Code Playgroud)