我试图在我的电脑上安装Kivy,但不幸的是我失败了。 我正在运行MacOS(v10.13.4)并且我已经成功安装了Cython(v0.26) 我跑了:
pip3 install kivy
然后该过程开始并发生以下错误:
**Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yl/kw3svt1x4rdfdjzsd5hds9_c0000gn/T/pip-req-build-869vs3u5/**.
是否可以修复它?
正如评论中所述,我发布了完整的错误跟踪:
`**Command Collecting kivy
Using cached https://files.pythonhosted.org/packages/8c/49/5c22589099f9b7fd106502ee6634a6675e634d7553fede141a7606e6a92d/Kivy-1.10.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/yl/kw3svt1x4rdfdjzsd5hds9_c0000gn/T/pip-install-nowxhf43/kivy/setup.py", line 668, in <module>
base_flags = determine_base_flags()
File "/private/var/folders/yl/kw3svt1x4rdfdjzsd5hds9_c0000gn/T/pip-install-nowxhf43/kivy/setup.py", line 551, in determine_base_flags
xcode_dev = getoutput('xcode-select -p').splitlines()[0]
IndexError: list index out of range
Using distutils
Detected Cython version 0.26
This version of Cython is untested with Kivy. While this version may
work perfectly fine, it is possible that you may experience issues. If
you do have issues, please downgrade to a supported version. It is
best to use the newest supported version, 0.25.2, but the minimum
supported version is 0.23.
If your platform provides a Cython package, check if you can downgrade
to a supported version. Otherwise, uninstall the platform package and
install Cython via pip:
pip install -I Cython==0.25.2
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 found\n'
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 found\n'
WARNING: A problem occurred while running xcode-select -p (code 2)
b'xcode-select: error: unable to get active developer directory, use `sudo xcode-select --switch path/to/Xcode.app` to set one (or see `man xcode-select`)\n'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yl/kw3svt1x4rdfdjzsd5hds9_c0000gn/T/pip-install-nowxhf43/kivy/**`