[R] Rpy and RSPython

Seth Falcon sfalcon at fhcrc.org
Fri Jun 10 20:34:54 CEST 2005


On 10 Jun 2005, helprhelp at gmail.com wrote:

> Hi,
> I tried to install RSPython, here is my problem:
> I load the env variables correctly as below:
> #------------------------------
> # R section
> #------------------------------
> R_HOME=/usr/lib/R
> PYTHONPATH=${R_HOME}/library/RSPython/Python:${R_HOME}/library/RSPython/libs
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R_HOME}/bin
>
> export R_HOME PYTHONPATH LD_LIBRARY_PATH
>
> When I run python and do:
> import RS
>
> here is the error: ImportError:
> /usr/lib/R/library/RSPython/libs/RSInternal.so: undefined symbol:
> R_GlobalEnv
>
> I googled and found I did not have $R_HOME/bin/libR.so since I
> installed R from binary package.
>
> My question is, should I have to re-install R from source? ( I think
> I have to, but want to make sure here :)
>
>
> When I tried to re-install R by following R installation and Admin
> intro, and I run ./configure --enable-R-shlib I got the following
> error: configure: error: --with-x=yes (default) and X11 headers/libs
> are not available I don't know why.

Presumably because you don't have the X11 devel headers available.
For an rpm system, look for packages like x11-devel or some such.  

> My third question: can Rpy save this trouble? In my understanding,
> Rpy needs that libR.so too. Am I right?

Rpy also needs libR.so.  So regardless, your first task is to setup up
your system for compiling R from sources so you can get the .so.  It
shouldn't be too bad.  Pay attention to the output of configure.  When
it complains about things, try to find a PKGNAME-devel.rpm package to
install and try again.

Best,

+ seth




More information about the R-help mailing list