编译 R 时需要指定 --enable-R-shlib
wget
./configure --prefix=/usr/local/R/R-2.11.1 --with-gnu-ld --with-cairo --with-x --enable-R-shlib
make && make install
下载 rpy2
需要指定 --r-home /usr/local/R/R-2.11.1/lib64/R/
wget
python setup.py build --r-home /usr/local/R/R-2.11.1/lib64/R/ install
在环境里
export R_HOME= /usr/local/R/R-2.11.1/lib64/R/
export LD_LIBRARY_PATH=${R_HOME}/lib:${LD_LIBRARY_PATH}
官方说明 :
% python -m 'rpy2.tests'
阅读(2900) | 评论(0) | 转发(0) |