错误:安装Kivy时,命令出错,退出状态为1



我正试图使用:pip3 install Kivy来安装Kivy,但我一直收到这个错误ERROR: command errored out with exit status 1我的pip是最新的,我尝试通过PyCharm和终端安装库(我使用的是mac(。提前感谢在下面添加了错误

Collecting Kivy
Using cached Kivy-1.11.1.tar.gz (23.6 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: /Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/setup.py'"'"'; __file__='"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-pip-egg-info-m9a_f9np
cwd: /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/
Complete output (92 lines):
Using setuptools
User distribution detected, avoid portable command.
Using this graphics system: OpenGL ES 2
OSX framework used, force to x86_64 only
OSX ARCHFLAGS are: -arch x86_64
GStreamer framework not found, fallback on pkg-config
WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 127)

b'/bin/sh: pkg-config: command not foundn'

Missing framework /Library/Frameworks/SDL2.framework
Missing framework /Library/Frameworks/SDL2_ttf.framework
Missing framework /Library/Frameworks/SDL2_image.framework
Missing framework /Library/Frameworks/SDL2_mixer.framework
SDL2 frameworks not found, fallback on pkg-config
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 127)

b'/bin/sh: pkg-config: command not foundn'

Xcode detected at b'/Applications/Xcode.app/Contents/Developer', and using OS X10.15 sdk
WARNING: A problem occurred while running pkg-config --libs --cflags pangoft2 (code 127)

b'/bin/sh: pkg-config: command not foundn'

ERROR: Dependency for context.pyx not resolved: config.pxi
ERROR: Dependency for compiler.pyx not resolved: config.pxi
ERROR: Dependency for context_instructions.pyx not resolved: config.pxi
ERROR: Dependency for fbo.pyx not resolved: config.pxi
ERROR: Dependency for gl_instructions.pyx not resolved: config.pxi
ERROR: Dependency for instructions.pyx not resolved: config.pxi
ERROR: Dependency for opengl.pyx not resolved: config.pxi
ERROR: Dependency for opengl_utils.pyx not resolved: config.pxi
ERROR: Dependency for shader.pyx not resolved: config.pxi
ERROR: Dependency for stencil_instructions.pyx not resolved: config.pxi
ERROR: Dependency for scissor_instructions.pyx not resolved: config.pxi
ERROR: Dependency for texture.pyx not resolved: config.pxi
ERROR: Dependency for vbo.pyx not resolved: config.pxi
ERROR: Dependency for vertex.pyx not resolved: config.pxi
ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi
ERROR: Dependency for cgl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_mock.pyx not resolved: config.pxi
ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi
ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi
ERROR: Dependency for svg.pyx not resolved: config.pxi
fatal: not a git repository (or any of the parent directories): .git
WARNING: The wheel package is not available.
WARNING: Skipping page https://github.com/kivy-garden/garden/archive/master.zip because the HEAD request got Content-Type: application/zip.The only supported Content-Type is text/html
ERROR: Command errored out with exit status 1:
command: /Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-ijxakt66/cython/setup.py'"'"'; __file__='"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-ijxakt66/cython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-oan20jxf
cwd: /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-ijxakt66/cython/
Complete output (7 lines):
Unable to find pgen, not compiling formal grammar.
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for cython
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/tmp25x0n6e6', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/archive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/setup.py", line 1073, in <module>
setup(
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/tmp25x0n6e6', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/archive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

你似乎错过了pkg-config,试试

brew install pkg-config

相关内容

  • 没有找到相关文章

最新更新