15

我已经从 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.

我用的是windows 10,请帮忙!

4

5 回答 5

25

这对我有用:

matham 15 天前发表评论 我们不太可能为 pypi 发布 3.8 的 1.11.1 版本。但是,您可以使用以下方法安装 kivy master:

pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
于 2019-12-15T18:02:24.413 回答
7

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

命令:pip install kivy==2.0.0rc2

适用于Windows 10 ProPython 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()
于 2020-09-02T21:46:24.083 回答
2

这适用于带有 python 3.8.0+ 的 macOS Catalina 10.15.6

pip install kivy==2.0.0rc2
于 2020-09-10T05:28:32.627 回答
0

如果您使用的是 conda 环境:

 conda install -c conda-forge kivy 

适用于python 3.8

于 2020-11-19T10:07:37.723 回答
-2

我是 Windows 10,带有 3.8.2

似乎 pip install kivy==2.0.0rc2 有效。至少它安装了。

是时候告诉我是否可以使用 3.8.2 进行开发

于 2020-09-11T21:15:46.907 回答