kivy / kivy

Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS
https://kivy.org
MIT License
17.53k stars 3.06k forks source link

Unable to install kivy on mac - gcc failed with exit status 1 #5770

Closed nanodan closed 6 years ago

nanodan commented 6 years ago

Versions

Description

Created a fresh virtual environment. Brew install all packages required. Pip install Cython==0.26.1. Pip install kivy (tried both pip install --user kivy and pip install kivy). and every time it fails:

screenshot

error: command 'gcc' failed with exit status 1

Code and Logs

kivy

ghost commented 6 years ago

Pip install Cython==0.26.1.

That's not compatible with Kivy stable (1.10.0), see setup.py for 1.10 branch. You need Cython==0.25.2 to build 1.10, or alternatively you can pip install kivy==master which is compatible with a wider range of Cythons, including 0.26.x

nanodan commented 6 years ago

pip install --upgrade cython==0.25.2 pip install --user kivy==1.10.0

results in the same error

dolang commented 6 years ago

I don't know a lot about macs, but now that Cython can be excluded as the culprit, this here looks a bit weird:

/System/Library/Frameworks/Accelerate.framework/.../Alpha.h

Looks like it finds the symbol it requires in some header of a system library, not something installed with brew. Now I don't really know — this might be expected behaviour, but I'm still going to ask: Have you installed the dependencies?

brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer

I'm assuming you've made several attempts. Was it always the exact same error?

If so, please include the full log here, but use -v.

pip install -v --user kivy==1.10.0

If not, and you had before/are getting this error at some point:

error: use of undeclared identifier 'MIX_INIT_MODPLUG'; did you mean 'MIX_INIT_MOD'?

then you need to install the development version. You may even just try this instead of the above, chances are high you'll run into that error.


Edit: Also have a look at #5615

eteamin commented 6 years ago

I have kivy==1.10.0 and Cython==0.26 working fine on Siera 10.12.6

akshayaurora commented 6 years ago

Kivy 1.10.1 on mac provides wheels, pip install kivy should just work now, no more compiling. Please check with kivy 1.10.1.