Skip to content

Instantly share code, notes, and snippets.

@scw
Last active August 29, 2015 13:58
Show Gist options
  • Save scw/9961407 to your computer and use it in GitHub Desktop.
Save scw/9961407 to your computer and use it in GitHub Desktop.
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