Installing rpy2 with the latest R 3.4.0 doesn't work on macOS. Apparently, R 3.4.0 was built using the '-fopenmp' flag with Clang 4.0.0, which is not supplied by Apple. Therefore,
pip install rpy2 gives the following error:
gcc -bundle -undefined dynamic_lookup -L/usr/local/anaconda/lib -L/usr/local/anaconda/lib -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/./rpy/rinterface/_rinterface.o -L/usr/local/lib -L/usr/local/anaconda/lib -Lbuild/temp.macosx-10.7-x86_64-3.6 -L/usr/local/lib -lpcre -llzma -lbz2 -lz -licucore -lm -liconv -lr_utils -o build/lib.macosx-10.7-x86_64-3.6/rpy2/rinterface/_rinterface.cpython-36m-darwin.so -fopenmp -F/Library/Frameworks/R.framework/.. -framework R clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1
Everything worked fine with R 3.3.3 (which was built with the system Clang).