OSError: cannot load library '/R/lib64/R/lib/libR.so': libRblas.so: cannot open shared object file

python3.6 使用rpy2包时 报错:
OSError: cannot load library ‘/R/lib64/R/lib/libR.so’: libRblas.so: cannot open shared object file: No such file or directory

解决方案:
1、找到R的安装路径:
OSError: cannot load library '/R/lib64/R/lib/libR.so': libRblas.so: cannot open shared object file_第1张图片
2、添加环境变量
vi /etc/profile
最后一行加以下代码

export LD_LIBRARY_PATH="/home/baoadmin/R/R/lib64/R/lib:$LD_LIBRARY_PATH"

使环境变量生效
source /etc/profile

就可以解决了!

你可能感兴趣的:(python)