【问题标题】:Kivy installing build dependencies...errorKivy 安装构建依赖项...错误
【发布时间】:2021-10-27 08:22:57
【问题描述】:

我是 python 新手,我想安装 kivy。当我做pip install kivy 时,它给了我以下错误。我有 python 3.10.0 和 pip 21.3.1。另外我想提一下,在安装其他模块时我没有收到任何这样的错误。

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:\Users\bamba\AppData\Local\Programs\Python\Python310\python.exe' 
'C:\Users\bamba\AppData\Local\Temp\pip-standalone-pip-kuk2dvss\__env_pip__.zip\pip' install -- 
 ignore-installed --no-user --prefix 'C:\Users\bamba\AppData\Local\Temp\pip-build-env- 
 3zq1w_aw\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

【问题讨论】:

  • 不要使用最新的 Python,因为某些模块可能还没有为这个版本做好准备。作者需要时间为新的 Python 重新编译 mdoules。最好等几个月,此时仍然使用3.8(最终是3.9)。
  • 谢谢!!!我下载了 3.9.0 版并安装了 kivy...

标签: python pip kivy


【解决方案1】:

先到here

转到 pip 窗口并创建 venv 并打开您的 cmd 并使用此 python -m pip install "kivy[base] @ https://github.com/kivy/kivy/archive/master.zip"

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 1970-01-01
  • 2020-08-27
  • 1970-01-01
  • 2022-12-16
  • 2020-10-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-25
相关资源
最近更新 更多