Python安装Kivy失败

3

我不明白为什么我无法安装kivy。

我使用的是Windows 10 64位操作系统,Python版本为3.10。

我尝试使用pippip3以管理员权限安装master.zip文件,但始终出现相同的错误(在Python 3.9上也是如此)。

这是终端的输出:

<code>PS C:\Users\dieun\Desktop\Python\kivy> pip3 install kivy
Defaulting to user installation because normal site-packages is not writeable
Collecting kivy
  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\python310\python.exe' 'C:\Users\dieun\AppData\Local\Temp\pip-standalone-pip-8ibcb9j6\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\dieun\AppData\Local\Temp\pip-build-env-m3qb
6iun\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_dep
s.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_platfor
m == "win32"'
       cwd: None
  Complete output (10 lines):
  Collecting setuptools
    Using cached setuptools-58.4.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\python310\python.exe' 'C:\Users\dieun\AppData\Local\Temp\pip-standalone-pip-8ibcb9j6\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\U
sers\dieun\AppData\Local\Temp\pip-build-env-m3qb6iun\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.gstreame
r_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.
  Using cached Kivy-1.11.1.tar.gz (23.6 MB)
  Preparing metadata (setup.py) ... error'''</code>

再次再次再次...


1
Python 3.10 是非常新鲜的版本,不是所有的模块都可以与此版本兼容。作者可能需要时间重新编译以适应新的 Python 版本。最好使用 Python 3.9 或者甚至 Python 3.8 并等待几个月。 - furas
1个回答

2

谢谢,我已经在Python 3.9(最新版本)上尝试过了,kivy的示例“Hello World”可以工作。 - Dieunis

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接