如何处理 Python 3.8 中 Kivy 安装错误?
- 2025-03-21 09:07:00
- admin 原创
- 46
问题描述:
我已经从 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.
我用的是windows10,请帮忙!
解决方案 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.0rc2
或pip 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()
解决方案 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 进行开发了
相关推荐
热门文章
项目管理软件有哪些?
热门标签
曾咪二维码
扫码咨询,免费领取项目管理大礼包!
云禅道AD