当我尝试在virtualenv中安装(使用自制软件)kivy for python 3.6时:
(vs36)MacBook-Pro-de-Juan:环境juancarlos1 $ python Python 3.6.1(v3.6.1:69c0db5050,2017年3月21日,01:21:04) [达尔文的GCC 4.2.1(Apple Inc. build 5666)(第3点)] 输入" help"," copyright"," credit"或"许可证"了解更多信息。
certifi(2017.11.5) chardet(3.0.4) 循环仪(0.10.0) Cython(0.26.1) docutils(0.14) idna(2.6) Kivy-Garden(0.1.4) lxml(4.1.1) matplotlib(2.1.1) numpy(1.14.0) 点子(9.0.1) Pygments(2.2.0) pyparsing(2.2.0) python-dateutil(2.6.1) python-docx(0.8.6) pytz(2017.3) 请求(2.18.4) scipy(1.0.0) setuptools(38.4.0) 六(1.11.0) urllib3(1.22) virtualenv(15.1.0) 车轮(0.30.0)
当我要求在kivy文档之后使用自制软件时,我遇到以下问题(运行kivy for python 2.7而不使用virtualen没有问题):
$ brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
我收到这些警告: 警告:已安装pkg-config 0.29.2 警告:已安装sdl2 2.0.7 警告:已安装sdl2_image 2.0.2 警告:已安装sdl2_ttf 2.0.14 警告:已安装sdl2_mixer 2.0.2_3 警告:gstreamer 1.12.4已经安装
用pip安装kivy之后: $ pip install kivy
然后生成很多这样的警告:
生成1个警告。 / usr / bin / clang -bundle -undefined dynamic_lookup -g -arch x86_64 build / temp.macosx-10.6-intel-3.6 / private / var / folders / zy / q412_r2s2258llsbt7c9fgwh0000gp / T / pip-build-01ys1bww / kivy / kivy /图形/ context_instructions.o -o建立/ lib.macosx-10.6-Intel的3.6 / kivy /图形/ context_instructions.cpython-36m-darwin.so -F /库/开发商/ CommandLineTools /平台/ MacOSX.platform /开发商/软件开发工具包/MacOSX10.13.sdk/System/Library/Frameworks -lm
并且最终失败了:
3 errors generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command" / Users / juancarlos1 / Environments / vs36 / bin / python3 -u -c" import setuptools,tokenize; file =' / private / var /folders/zy/q412_r2s2258llsbt7c9fgwh0000gp/T/pip-build-01ys1bww/kivy/setup.py';f=getattr(tokenize,'开&#39 ;,打开)(的文件 ); code = f.read()。replace(' \ r \ n',' \ n'); f.close(); exec(编译(代码,文件,' exec'))" install --record /var/folders/zy/q412_r2s2258llsbt7c9fgwh0000gp/T/pip-x7xb41xw-record/install-record.txt --single-version-external-managed --compile --install-headers / Users / juancarlos1 / Environments / vs36 / bin中/../包括/站点/ python3.6 / kivy"在/ private / var / folders / zy / q412_r2s2258llsbt7c9fgwh0000gp / T / pip-build-01ys1bww / kivy /
中出现错误代码1失败