“错误:找不到满足要求的版本 kivy_deps.sdl2_dev~=0.4.5(来自版本:0.5.1)”出现在尝试安装 kivy

问题描述 投票:0回答:2

当我尝试在 Python 上安装 Kivy 时,在标题中的消息出现之前,它一开始运行良好。

C:\Users\finnj>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
  ╰─> [10 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
      [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.

我尝试安装“cython”,因为它有助于解决一些类似的问题,但它根本没有改变。

我的版本是3.11.

python pip kivy virtualenv command-prompt
2个回答
3
投票

需要用命令安装

pip 安装 git+https://github.com/kivy/kivy

我也有同样的问题,但我从 github 和它的工作安装它


0
投票

运行命令

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

© www.soinside.com 2019 - 2024. All rights reserved.