Skip to content

Instantly share code, notes, and snippets.

@fonnesbeck
Created July 16, 2014 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fonnesbeck/71fb84319d33e3227e87 to your computer and use it in GitHub Desktop.
Save fonnesbeck/71fb84319d33e3227e87 to your computer and use it in GitHub Desktop.
Installing rpy2 against Homebrew R
env LDFLAGS="-L/usr/local/Cellar/r/3.1.0/R.framework/Versions/3.1/Resources/lib -L/usr/local/opt/openblas/lib" \
python setup.py build
python setup.py install
python -m 'rpy2.tests'
@wkschwartz
Copy link

The following worked for me on macOS 10.13.6, Python 3.7.2, R 3.5.2, and Homebrew 2.0.0.

First install R, and, if needed, Python.

$ brew install python r

If you want, create a virtual environment and activate it now. Then run

$ pip install rpy2 --no-binary :all:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment