kivy: Kivy installation on MacOS 10.13 fails

Versions

  • Python: 3.6
  • OS: MacOS 10.13
  • Xcode: 9.0
  • Kivy: latest Dev build as of the writing of this post
  • Kivy installation method: brew + pip

Description

When attempting to install kivy as described in the docs https://kivy.org/docs/installation/installation-osx.html I run into a similar error as was described in #4669.

Code and Logs

Heres my installation process

brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer no issues… pip install -U Cython no issues ‘pip install kivy’ error:

… building ‘kivy.graphics.svg’ extension /usr/bin/gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -arch i386 -arch x86_64 -I/private/var/folders/k5/8nmpgw7x1m5fmlpl9yygs6080000gn/T/pip-1_stgghk-build/kivy/include -I/private/var/folders/k5/8nmpgw7x1m5fmlpl9yygs6080000gn/T/pip-1_stgghk-build/kivy/include -I/Users/Matt/Development/projects/sermon_uploader/.venv/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c /private/var/folders/k5/8nmpgw7x1m5fmlpl9yygs6080000gn/T/pip-1_stgghk-build/kivy/graphics/svg.c -o build/temp.macosx-10.6-intel-3.6/private/var/folders/k5/8nmpgw7x1m5fmlpl9yygs6080000gn/T/pip-1_stgghk-build/kivy/graphics/svg.o -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks /private/var/folders/k5/8nmpgw7x1m5fmlpl9yygs6080000gn/T/pip-1_stgghk-build/kivy/graphics/svg.c:1:2: error: Do not use this file, it is the result of a failed Cython compilation. #error Do not use this file, it is the result of a failed Cython compilation. ^ 1 error generated. error: command ‘/usr/bin/gcc’ failed with exit status 1

Any ideas? I thought clang was supposed to be used since i have the latest version of Xcode installed, but it still seems to be trying to use gcc.

Let me know if there’s any other information i can provide that would be helpful.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 28 (7 by maintainers)

Most upvoted comments

wow…that solved my issue…lots of love bro @manthansharma ❤️ ❤️

I ended up clearing out all my different python installations and reinstalling python3 using home-brew. After that, i brew installed the kivy requirements, upgraded brew, and then pip installed cython==0.25.2 and then pip installed kivy. @manthansharma thanks for the tips. It was nice to clean up some old python installations i had floating around too. Now i have a clean install and kivy in my virtual env. cool!