通过以下方式在 Amazon Linux 上安装 rpy2
sudo pip-2.7 install rpy2
失败
In file included from ./rpy/rinterface/_rinterface.c:58:0:
./rpy/rinterface/_rinterface.h:8:15: fatal error: R.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
通过编译源进行安装也会以同样的方式失败。sudo python2.7 setup.py install
完整日志位于: https://gist.github.com/4362543
答案1
答案是使用以下命令安装 R 开发文件:
sudo yum -y install R-devel