Skip to content

Instantly share code, notes, and snippets.

@rca
Forked from goldsmith/numpy_os_x_10_9.sh
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rca/c00c26981da35b15d55c to your computer and use it in GitHub Desktop.
Save rca/c00c26981da35b15d55c to your computer and use it in GitHub Desktop.
#!/bin/bash
GFORTRAN_URL='http://gcc.gnu.org/wiki/GFortranBinaries#MacOS'
which gfortran
[ "$?" != "0" ] && echo "download and install gfortran from ${GFORTRAN_URL}" && exit 1
# set up flags for Numpy C extentions compiling
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"
# install numpy
pip install numpy
# now for scipy
pip install cython
# finally
pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment