1

pip install rpy2 yields the error:

/usr/bin/clang -bundle -undefined dynamic_lookup -L/Users/jeff/anaconda3/lib -arch x86_64 build/temp.macosx-10.5-x86_64-3.4/./rpy/rinterface/_rinterface.o -L/Users/jeff/anaconda3/lib -L/opt/local/Library/Frameworks/R.framework/Resources/lib -lR -lRlapack -licui18n -lRblas -o build/lib.macosx-10.5-x86_64-3.4/rpy2/rinterface/_rinterface.so

ld: library not found for -licui18n

clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: command '/usr/bin/clang' failed with exit status 1


I had installed rpy2 with MacPorts. Suggestions? Thanks!

jeffalstott
  • 2,643
  • 4
  • 28
  • 34

1 Answers1

2

If you are not too picky about the R version, you can uninstall the Macports R and install rpy2 and R together with conda: https://binstar.org/r/rpy2

If you really want to use the R you have installed with MacPorts, that would make me kind of sad (hint: brew install r). But you can use conda to create your own rpy2 recipe that uses whatever R it finds installed, something like this (assumes you have R in your PATH):

conda skeleton pypi rpy2
conda build rpy2
conda install rpy2 --use-local
mattexx
  • 6,456
  • 3
  • 36
  • 47
  • I'm trying to figure out how to adapt this for my situation. Can you explain a few of the parts? I have a conda environment where all my R packages are located. I want to link my rpy2 to this environment. http://stackoverflow.com/questions/42126077/use-rpy2-with-packages-installed-in-r-conda-environment – O.rka Feb 09 '17 at 20:34