在Mac OSX上通过Macports安装带有Anaconda Python 3.4和R 3.1的Rpy2 [英] Installing Rpy2 on Mac OSX with Anaconda Python 3.4 and R 3.1 installed via Macports
问题描述
pip install rpy2
产生错误:
/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
/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:找不到-licui18n的库
clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
错误:命令'/usr/bin/clang'失败,退出状态为1
error: command '/usr/bin/clang' failed with exit status 1
我已经在MacPorts上安装了rpy2
.有什么建议吗?谢谢!
I had installed rpy2
with MacPorts. Suggestions? Thanks!
推荐答案
如果您对R版本不太挑剔,则可以卸载Macports R并将rpy2和R与conda一起安装:
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
如果您真的想使用MacPorts所安装的R,那会让我有些难过(提示:brew install r
).但是您可以使用conda来创建自己的rpy2配方,该配方使用它发现安装的任何R,如下所示(假设您的PATH中有R):
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
这篇关于在Mac OSX上通过Macports安装带有Anaconda Python 3.4和R 3.1的Rpy2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!