安装构建依赖的Kivy pip子进程未成功运行



当我尝试在windows 10命令提示符上pip安装kivy时,我得到这个错误

Collecting kivy
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Collecting setuptools
Using cached setuptools-65.5.1-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting kivy_deps.gstreamer_dev~=0.3.3
Using cached kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl (3.9 MB)
ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

我该如何解决这个问题?

我想pip install kivy但是它不工作

Kivy目前在python 3.11中不可用,它在使用3.10.8时工作得很好。使用旧版本的python,等待它们可用。

你也可以这样用:

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

我也有同样的错误,尝试了所有方法,但甚至无法安装它,即使是在虚拟环境中。但是这个命令

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

解决了我的问题。现在Kivy在没有任何依赖的情况下运行了。

相关内容

  • 没有找到相关文章

最新更新