You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows11最新Python版本安装Kivy失败求助

解决Kivy安装时依赖版本不匹配问题

问题原因

你使用的是Python 3.11,默认pip拉取的Kivy 2.1.0并不支持该Python版本,触发源码编译流程后,它依赖的kivy_deps.sdl2_dev~=0.4.5版本已在PyPI上更新为0.5.1,导致版本匹配失败。

解决步骤

  • 直接安装支持Python 3.11的Kivy新版本,执行命令:
    pip install kivy>=2.2.0
  • 如果上述命令仍有问题,先手动安装对应版本的依赖,再安装Kivy:
    1. pip install kivy_deps.sdl2_dev==0.5.1
    2. pip install kivy
  • 也可以借助conda环境安装(需提前配置conda),conda会自动处理依赖兼容性:
    conda install -c conda-forge kivy

附错误日志

PS C:\Users\Nilkn\Dropbox\My PC (FranklinSoul)\Desktop\appPython\FKL> pip install 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
╰─> [13 lines of output]
Collecting setuptools
Using cached setuptools-65.6.3-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

[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
[end of output]

内容的提问来源于stack exchange,提问作者Nilknarf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 20:20:35