0

无论我尝试什么,kivy 总是无法安装。我可以安装大多数其他软件包,但不能安装 kivy。我通过pycharm尝试了它,重新安装了python,并在cmd提示符下尝试了每个命令,它就是无法安装。

这是我得到的错误:

C:\Program Files\Python 3.10.0>python -m pip install kivy==2.0.0
Collecting kivy==2.0.0
  Using cached Kivy-2.0.0.tar.gz (23.7 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Program Files\Python 3.10.0\python.exe' 'C:\Users\ranta\AppData\Local\Temp\pip-standalone-pip-12uaq80_\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\ranta\AppData\Local\Temp\pip-build-env-pi2ci1b2\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.24,<=0.29.21,!=0.27,!=0.27.2' 'kivy_deps.gstreamer_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew_dev~=0.3.0; sys_platform == "win32"' 'kivy_deps.gstreamer~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew~=0.3.0; sys_platform == "win32"'
       cwd: None
  Complete output (10 lines):
  Collecting setuptools
    Using cached setuptools-58.3.0-py3-none-any.whl (946 kB)
  Collecting wheel
    Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
  Collecting cython!=0.27,!=0.27.2,<=0.29.21,>=0.24
    Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
  Collecting kivy_deps.gstreamer_dev~=0.3.1
    Using cached kivy_deps.gstreamer_dev-0.3.2-cp310-cp310-win_amd64.whl (3.9 MB)
  ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.3.1 (from versions: 0.4.2, 0.4.3)
  ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.3.1
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/12/96/091ddacafb84dd18555a32d860dbfaf9c806147aa30c6f3c8b93cb7bab97/Kivy-2.0.0.tar.gz#sha256=d25e44eb44e43762b2fd0c5874e51954e0f1181fd9800d8a6756be6d084812d8 (from https://pypi.org/simple/kivy/). Command errored out with exit status 1: 'C:\Program Files\Python 3.10.0\python.exe' 'C:\Users\ranta\AppData\Local\Temp\pip-standalone-pip-12uaq80_\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\ranta\AppData\Local\Temp\pip-build-env-pi2ci1b2\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.24,<=0.29.21,!=0.27,!=0.27.2' 'kivy_deps.gstreamer_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew_dev~=0.3.0; sys_platform == "win32"' 'kivy_deps.gstreamer~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew~=0.3.0; sys_platform == "win32"' Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement kivy==2.0.0 (from versions: 1.0.1a0, 1.0.2a0, 1.0.3a0, 1.0.4b0, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1, 2.0.0rc1, 2.0.0rc2, 2.0.0rc3, 2.0.0rc4, 2.0.0)
ERROR: No matching distribution found for kivy==2.0.0

错误结束

任何帮助将不胜感激!

4

3 回答 3

4

编辑:Kivy 现在支持 3.10:https ://kivy.org/doc/master/gettingstarted/installation.html#install-kivy

在他们的 PyPI 页面他们的 GitHub 上做了一些研究

看起来 Kivy 还不支持 Python 3.10。(GitHub问题

Kivy 目前支持 Python 3.6 - 3.9

于 2021-11-01T00:38:01.493 回答
0

我遇到了同样的问题,我可以通过卸载 python 3.10 来解决这个问题,它适用于 python 3.9。卸载 python 3.10 后,我按照kivy 安装页面中的步骤操作,它可以工作。当我按照这些步骤操作时,我的虚拟环境是在 python 3.8.8(Python 3.8.8 64 位('kivy_venv':venv))中创建的,我不知道为什么,但至少它可以工作。

于 2022-01-08T21:52:12.080 回答
-1

我遇到了同样的问题并通过卸载 3.10 并安装 3.9.10 解决了它。

于 2022-02-19T09:50:44.317 回答