Skip to content

Instantly share code, notes, and snippets.

@scw
Last active Aug 29, 2015
Embed
What would you like to do?
wrap calls to pip to force usage of the GCC environment over Clang
# I've added this to my ~/.bash_profile to use it, you could also create a stand-alone shell script.
# Usage: pipx install cython
function pipx() {
# Many Python packages don't install correctly with clang, as mentioned here:
# https://gist.github.com/goldsmith/7262122
# This wrapper forces gcc for pip installations:
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc
export CXX="g++ -arch i386 -arch x86_64"
sudo -E pip "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment