[R-sig-Geo] rPython installation problem

Roger Bivand Roger.Bivand at nhh.no
Wed Feb 26 18:59:10 CET 2014


On Wed, 26 Feb 2014, Javier Martínez López wrote:

> Hello all,
>
> I need to combine R and Python to process large raster files and I would like 
> to use the "rPython" library for direct transformation of the data objects 
> created using those environments. However, when I try to install it, it 
> produces the following error related to the python libraries (see below). I 
> just installed the Anaconda python distribution locally (no admin rights) in 
> my home folder (Linux CentOS), which might be causing the problem, but I do 
> not know how to deal with this issue, so any help is welcome!

This is not a specific question for this list, but there may be interest 
in this fresh and as yet unproven package. What does:

locate libpython2.7

say on your system? On current Fedora, I see:

/usr/lib64/libpython2.7.so

with:

$ python --version
Python 2.7.5

as per the advice in:

http://cran.r-project.org/web/packages/rPython/INSTALL

Your system should provide python, but may have only the python, not both 
that and the python-devel RPMs installed. If you have installed 
libpython2.7.so locally, you may need to adjust your LD_LIBRARY_PATH so 
that the library is visible. If you can get your sysadmin to add the 
python-devel RPM, life may be easier. Also, write to the package 
maintainer suggesting that libpython be checked in configure.

Hope this helps,

Roger

>
> Thank you very much and cheers,
>
> Javier
>
>> install.packages('rPython')
> Installing package into /home/majavie/R/x86_64-redhat-linux-gnu-library/3.0
> (as lib is unspecified)
> trying URL 
> 'http://cran.mirror.garr.it/mirrors/CRAN/src/contrib/rPython_0.0-4.tar.gz'
> Content type 'text/plain' length 37034 bytes (36 Kb)
> opened URL
> ==================================================
> downloaded 36 Kb
>
> * installing *source* package rPython ...
> ** package rPython successfully unpacked and MD5 sums checked
> a specific python version to use was not provided
> defaulting to the standard python in the system
> checking for gcc... gcc -m64 -std=gnu99
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc -m64 -std=gnu99 accepts -g... yes
> checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include
> -I/home/majavie/anaconda/include/python2.7
> -I/home/majavie/anaconda/include/python2.7 -D
> PYTHONLIBFILE=libpython2.7.so -fpic  -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic  -c pycall.c -o pycall.o
> gcc -m64 -std=gnu99 -shared -L/usr/local/lib64 -o rPython.so pycall.o
> -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic
> -L/usr/lib64/R/lib -lR
> /usr/bin/ld: cannot find -lpython2.7
> collect2: ld returned 1 exit status
> make: *** [rPython.so] Error 1
> ERROR: compilation failed for package rPython
> * removing /home/majavie/R/x86_64-redhat-linux-gnu-library/3.0/rPython
> * restoring previous 
> /home/majavie/R/x86_64-redhat-linux-gnu-library/3.0/rPython
>
> The downloaded source packages are in
>   /tmp/RtmpfPBtPF/downloaded_packages
> Warning message:
> In install.packages("rPython") :
> installation of package rPython had non-zero exit status
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no


More information about the R-sig-Geo mailing list