【问题标题】:Error trying to install kivy on Python 3.8 [duplicate]尝试在 Python 3.8 上安装 kivy 时出错 [重复]
【发布时间】:2021-01-13 07:06:58
【问题描述】:

我正在尝试安装,但每次我尝试安装时都会遇到这个巨大的错误:

    WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)

    b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

    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.

【问题讨论】:

  • 看起来 kivy 不适用于 python 3.8,只能到 3.7。从这个页面:kivy.org/#download

标签: kivy python kivy python-3.8


【解决方案1】:

https://github.com/kivy/kivy/issues/6563#issuecomment-560039155

pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/.

【讨论】:

    【解决方案2】:

    删除 kivvy 并尝试使用 apt 安装它

    pip uninstall kivy    
    sudo apt install python3-kivy
    

    其他解释可以在 kivy 的文档中找到。

    【讨论】:

      猜你喜欢
      • 2020-07-03
      • 1970-01-01
      • 1970-01-01
      • 2020-04-28
      • 2020-04-05
      • 2017-05-10
      • 1970-01-01
      • 1970-01-01
      • 2020-06-18
      相关资源
      最近更新 更多