jeffalstott
jeffalstott

Reputation: 2693

Installing Rpy2 on Mac OSX with Anaconda Python 3.4 and R 3.1 installed via Macports

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!

Upvotes: 1

Views: 2638

Answers (1)

mattexx
mattexx

Reputation: 6606

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

Upvotes: 2

Related Questions