python v 2.7,linux mint。当我尝试pip install kivy时,我不断收到此错误消息。“命令”python setup.py egg_info“失败,错误代码1在/ tmp / pip-build-jI7YZC / kivy /
$ pip install kivy
Collecting kivy
Using cached Kivy-1.10.0.tar.gz
Complete output from command python setup.py egg_info:
Using distutils
Detected Cython version 0.24.1
Using this graphics system: OpenGL
WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
Package gstreamer-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-1.0' found
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
Package SDL2_ttf was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_ttf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_ttf' found
Package SDL2_image was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_image.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_image' found
Package SDL2_mixer was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_mixer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_mixer' found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-BWSdZv/kivy/setup.py", line 934, in <module>
version=get_version(),
File "/tmp/pip-build-BWSdZv/kivy/setup.py", line 47, in get_version
['git', 'rev-parse', 'HEAD']
File "/home/jq/anaconda/lib/python2.7/subprocess.py", line 567, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/home/jq/anaconda/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/home/jq/anaconda/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or director
这是整个日志
答案 0 :(得分:1)
您可以使用替代方法在Linux MINT上安装kivy:
首先安装ppa包。
sudo add-apt-repository ppa:kivy-team/kivy
然后更新所有包
sudo apt-get update
现在使用以下命令
sudo apt-get install python-kivy
sudo apt-get install python3-kivy
sudo apt-get install python-kivy-example
我认为就是这样。