当我运行这个命令时,我有一个错误:
pip install kivy下面是错误:
Collecting kivy
Using cached Kivy-1.10.0.tar.gz
Complete output from command python setup.py egg_info:
Using distutils
Cython is missing, it's required for compiling kivy !
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-aHd9E8/kivy/setup.py", line 219, in <module>
from Cython.Distutils import build_ext
ImportError: No module named Cython.Distutils
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-aHd9E8/kivy/所以有人能帮我安装这个python库(如果可能的话,安装python2.7),我做了我的研究,我没有发现任何东西。
发布于 2017-11-09 05:56:34
安装这些:
brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
xcode-select --install
pip install Cython==0.26.1 --user
pip install https://github.com/kivy/kivy/archive/master.zip你应该能够在MacOSX高山上使用kivy
theecodedragon$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import kivy
[WARNING] [Config ] Older configuration version detected (0 instead of 20)
[WARNING] [Config ] Upgrading configuration in progress.
[INFO ] [Logger ] Record log in /Users/theecodedragon/.kivy/logs/kivy_17-11-09_0.txt
[INFO ] [Kivy ] v1.10.1.dev0, git-Unknown, 20171108
[INFO ] [Python ] v2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
>>> 编辑:
这适用于目前的最新版本:
theecodedragon$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.1
BuildVersion: 17B48发布于 2017-11-03 01:20:25
尝试安装Cython:pip install Cython。
如果没有帮助,那么您可能使用了错误的python安装。详情请参考this answer。
https://stackoverflow.com/questions/47081059
复制相似问题