1

I am trying to use pip to install rpy2 on OSX 10.12.5. I get this error:

clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
error: command '/usr/bin/clang' failed with exit status 1

From what I understand, this is because my version of clang does not support OpenMP. Using homebrew, I installed LLVM 8.1.0 (clang 802.0.42), but now I need to update clang to support OpenMP. Can anyone give me detailed instructions of how to go about this? I am not understanding the other sources I am reading online.

hannah
  • 889
  • 4
  • 13
  • 27
  • You can generally compile software that requires openmp on macs using homebrew gcc (see https://stackoverflow.com/a/29109926/28035). It might help to show us how you're trying to install rpy2, including all the commands you've issued and all the output (I haven't had this issue and I run rpy2 on several macs...). – Noah May 24 '17 at 15:38
  • FWIW there is an open issue about it here: https://bitbucket.org/rpy2/rpy2/issues/403/cannot-pip-install-rpy2-with-latest-r-340 – lgautier Jun 24 '17 at 15:28

1 Answers1

2

I just got rpy2-2.9.0 to install via pip on Mac OSX 10.13, after getting the same error you reported, by downgrading to R 3.3.3, downloaded from https://cran.r-project.org/bin/macosx/. I just re-installed R 3.3.3 then re-ran 'pip install rpy2' and it installed fine.

Eric Busboom
  • 301
  • 3
  • 7