最近在写一个小程序,里面有个可视化部分的一个需求在python里实在找不到,就准备调用R来完成,于是去读了这个模块的documentation,也试写了test的脚本,结果安装完运行的时候报错ImportError……
从pip和conda安装下来都是这个问题,import rpy2没事,import rpy2.xxx之类模块里面的东西的时候就报错,有没有人遇到过类似的情况给个指点_(:з」∠)_[code]Traceback (most recent call last):
File "/Users/zhengfuni/Desktop/philippine/hap_pre_dispose.py", line 4, in
import rpy2.robjects as robjects
File "/Users/local/anaconda3/lib/python3.6/site-packages/rpy2/robjects/__init__.py", line 16, in
import rpy2.rinterface as rinterface
File "/Users/local/anaconda3/lib/python3.6/site-packages/rpy2/rinterface/__init__.py", line 92, in
from rpy2.rinterface._rinterface import (baseenv,
ImportError: dlopen(/Users/zhengfuni/anaconda3/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libicuuc.54.dylib
Referenced from: /Users/zhengfuni/anaconda3/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so
Reason: image not found[/code]
阅读全文
收起全文