Error when loading rpy2 with anaconda

流过昼夜 提交于 2019-12-18 13:28:32

问题


I am trying to load rpy2 inside a project where I am working with anaconda and I am getting a surprising error for which I cannot find a solution. My python version is 3.4, my anaconda version is 3.17.0 - I am using a Mac (OSX Yosemite version 10.10.4)

R version 3.2.2 (2015-08-14) -- "Fire Safety"

Platform: x86_64-apple-darwin11.4.2 (64-bit)

try:
    from rpy2 import robjects
except ImportError as e:
    print(e)

I am getting this error message

dlopen(/Users/user1/anaconda/lib/python3.4/site-packages/rpy2/rinterface/_rinterface.so, 2): Library not loaded: @rpath/R/lib/libR.dylib Referenced from:

/Users/user1/anaconda/lib/python3.4/site-packages/rpy2/rinterface/_rinterface.so Reason: image not found

Thanks in advance for your help


回答1:


I just built an updated rpy2 2.7.0 against R 3.2.2. Can you run

conda install -c r rpy2 

and see if that fixes it?



来源:https://stackoverflow.com/questions/32602578/error-when-loading-rpy2-with-anaconda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!