错误:命令错误,退出状态为1-无法安装Kivy

时间:2020-11-10 06:22:38

标签: python installation kivy

我正在尝试在Python 3.8上安装Kivy,但是我不确定为什么它不起作用。

我一直在关注这些instructions,但在最终安装Kivy的那一部分时遇到了麻烦:

python -m pip install kivy == 1.11.1


编辑:

尝试安装pkg-install,但是没有用。

试图在虚拟环境中安装pkg-config,但是没有用。

试图安装Windows 10 SDK来解决io.h问题,但这带来了新的错误。


安装Windows 10 SDK后出现以下错误消息:

(错误信息实际上已从文本量中删除)

[...] a bunch of copying

\kivy\tools\theming\defaulttheme
  copying kivy\tools\theming\defaulttheme\vkeyboard_disabled_key_normal.png -> build\lib.win-amd64-3.8\kivy\tools\theming\defaulttheme
  copying kivy\tools\theming\defaulttheme\vkeyboard_key_down.png -> build\lib.win-amd64-3.8\kivy\tools\theming\defaulttheme
  copying kivy\tools\theming\defaulttheme\vkeyboard_key_normal.png -> build\lib.win-amd64-3.8\kivy\tools\theming\defaulttheme
  running build_ext
  ----------------------------------------
  ERROR: Failed building wheel for kivy
  Running setup.py clean for kivy
  Building wheel for Kivy-Garden (setup.py) ... done
  Created wheel for Kivy-Garden: filename=Kivy_Garden-0.1.4-py3-none-any.whl size=4536 sha256=ccdae0685665ec663c778d7d305fb2f1d0c2aa16d16fd34db6b355d32e8016e1
  Stored in directory: c:\users\redxx\appdata\local\pip\cache\wheels\d2\72\1a\9ddd17f00755707937caa350616965fb3330a6270425f397e6
Successfully built Kivy-Garden
Failed to build kivy
Installing collected packages: urllib3, certifi, idna, chardet, requests, Kivy-Garden, kivy
    Running setup.py install for kivy ... error
    ERROR: Command errored out with exit status 3221225477:
     command: 'C:\Users\redxx\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\kivy\\setup.py'"'"'; __file__='"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\kivy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\redxx\AppData\Local\Temp\pip-record-sxsypwdh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\redxx\kivy_venv\include\site\python3.8\kivy'
         cwd: C:\Users\redxx\AppData\Local\Temp\pip-install-bd6bdwng\kivy\
    Complete output (512 lines):
    Using setuptools
    User distribution detected, avoid portable command.
    Using this graphics system: OpenGL
    WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)  


    b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

    WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)  

    b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

    WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)

    b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"

[...] a bunch of running/creating/copying

RROR: Command errored out with exit status 3221225477: 'C:\Users\redxx\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\kivy\\setup.py'"'"'; __file__='"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\kivy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\redxx\AppData\Local\Temp\pip-record-sxsypwdh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\redxx\kivy_venv\include\site\python3.8\kivy' Check the logs for full command output.

任何人都可以帮助我了解问题所在以及如何解决该问题吗?

0 个答案:

没有答案
相关问题