【问题标题】:How to deal with Kivy installing error in Python 3.8?如何处理 Python 3.8 中的 Kivy 安装错误?
【发布时间】:2020-03-26 06:11:31
【问题描述】:

我已经从 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,请帮忙!

【问题讨论】:

  • 你用的是什么python版本?
  • 3.8.0,几秒钟前刚刚检查过!
  • 尝试改用 3.7。
  • 它工作,在 3.7 上安装,但现在我有另一个错误。虽然它已安装,但它告诉我它不存在。我有这个错误:'kivy' 不被识别为内部或外部命令、可运行程序或批处理文件。你知道在这里做什么吗?
  • 听起来您正试图将kivy 作为命令行命令运行,但这不是您可以做的事情,Kivy 是您必须在 Python 中导入的 Python 模块。如果这不能解释您的问题,请提供有关您正在尝试的内容的更多信息。

标签: python python-3.x windows-10 kivy python-3.8


【解决方案1】:

这对我有用:

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/

【讨论】:

    【解决方案2】:

    尝试使用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()
    

    【讨论】:

    • 它也适用于 rc4、arch linux 和 python 3.8.5
    【解决方案3】:

    这适用于 macOS Catalina 10.15.6 和 python 3.8.0+

    pip install kivy==2.0.0rc2
    

    【讨论】:

      【解决方案4】:

      如果你使用的是 conda 环境:

       conda install -c conda-forge kivy 
      

      适用于 python 3.8

      【讨论】:

        【解决方案5】:

        我是 Windows 10,带有 3.8.2

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

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

        【讨论】:

          猜你喜欢
          • 2021-01-28
          • 2020-12-12
          • 2015-06-07
          • 1970-01-01
          • 2021-01-13
          • 2020-07-03
          • 1970-01-01
          • 2020-03-12
          • 2020-07-21
          相关资源
          最近更新 更多