[R-sig-Geo] rPython installation problem

Javier Martínez López javier.martinez at um.es
Thu Feb 27 11:24:03 CET 2014


Dear Roger,

your help is very much appreciated! When I try to locate libpython2.7  
is does not come up, but the file is present in my $HOME/anaconda/lib.  
Systemwide only python 2.6 is present due to a conflict with 2.7 in  
CentOS.

I tried something like:

R CMD INSTALL rPython_0.0-4.tar.gz  
--configure-args='LD_LIBRARY_PATH=/home/majavie/anaconda/lib/'

and

R CMD INSTALL rPython_0.0-4.tar.gz  
--configure-args='PYTHONLIBFILE=/home/majavie/anaconda/lib/libpython2.7.so'

but still getting the same error, and when try:

export LD_LIBRARY_PATH=/home/majavie/anaconda/lib/:$PATH

then I cannot even start R!... so, I might try to install a local  
version of R from source, just to try if this one works!

Thank you again and cheers,

Javier




Quoting Roger Bivand <Roger.Bivand at nhh.no>:

> 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
>



-- 
Javier Martínez-López
Ecology and Hydrology Department
Biology Faculty
University of Murcia
Espinardo E-30100
Murcia - Spain

E-mail: javier.martinez at um.es
web: http://webs.um.es/javier.martinez



More information about the R-sig-Geo mailing list