[R] RSpython Ubuntu

kaveh vakili kaveh.vakili at ulb.ac.be
Thu May 20 17:29:28 CEST 2010


Dear List,

I'd like to call pyhton function from within R. I tried installing the latest 
version of RSPython:

wget http://www.omegahat.org/RSPython/RSPython_0.7-1.tar.gz
R CMD INSTALL --clean RSPython_0.7-1.tar.gz

I get a compile error (posted below). 

Did anyone else run against this ? Is there a solution ?

checking for python... /usr/bin/python
Python version 2.6
Using threads
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
R version 2
Looking for libR.so in lib/
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makevars
config.status: creating cleanup
config.status: creating inst/scripts/RPython.csh
config.status: creating inst/scripts/RPython.bsh
** libs
gcc -std=gnu99 -I/usr/share/R/include -I../inst/include -I/usr/include/python2.6 
-D_R_=1 -DUSE_R=1     -fpic  -g -O2 -c GeneralConverters.c -o 
GeneralConverters.o
In file included from ../inst/include/UserConverters.h:4,
                 from GeneralConverters.c:1:
../inst/include/RPythonModule.h:4:20: error: Python.h: No such file or directory
In file included from ../inst/include/UserConverters.h:4,
                 from GeneralConverters.c:1:
../inst/include/RPythonModule.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘*’ token
../inst/include/RPythonModule.h:15: error: expected ‘)’ before ‘*’ token
../inst/include/RPythonModule.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘*’ token
In file included from GeneralConverters.c:1:
../inst/include/UserConverters.h:13: error: expected ‘)’ before ‘*’ token
../inst/include/UserConverters.h:15: error: expected ‘)’ before ‘*’ token
../inst/include/UserConverters.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘FromTargetConverterMatch’
../inst/include/UserConverters.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘FromTargetConverter’
../inst/include/UserConverters.h:24: error: expected specifier-qualifier-list 
before ‘FromPythonConverterMatch’
../inst/include/UserConverters.h:35: error: expected declaration specifiers or 
‘...’ before ‘PyClassObject’
In file included from GeneralConverters.c:1:
../inst/include/UserConverters.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘*’ token
../inst/include/UserConverters.h:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘ToTargetConverter’
../inst/include/UserConverters.h:46: error: expected specifier-qualifier-list 
before ‘ToPythonConverter’
../inst/include/UserConverters.h:63: error: expected ‘)’ before ‘*’ token
../inst/include/UserConverters.h:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘*’ token
../inst/include/UserConverters.h:74: error: expected ‘)’ before ‘Rf_match’
../inst/include/UserConverters.h:78: error: expected declaration specifiers or 
‘...’ before ‘ToPythonConverter’
GeneralConverters.c: In function ‘removeFromTargetConverterByIndex’:
GeneralConverters.c:23: error: ‘RSFromPythonConverter’ has no member named 
‘next’
GeneralConverters.c:29: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:36: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:36: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c: In function ‘removeToTargetConverterByIndex’:
GeneralConverters.c:53: error: ‘RSToPythonConverter’ has no member named ‘next’
GeneralConverters.c:59: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c:66: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c:66: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c: In function ‘removeFromTargetConverterByDescription’:
GeneralConverters.c:85: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:85: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:87: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:94: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c: In function ‘RPython_removeConverter’:
GeneralConverters.c:128: warning: implicit declaration of function ‘free’
GeneralConverters.c:128: warning: incompatible implicit declaration of built-in 
function ‘free’
GeneralConverters.c:135: error: ‘RSToTargetConverter’ has no member named 
‘description’
GeneralConverters.c:138: warning: incompatible implicit declaration of built-in 
function ‘free’
GeneralConverters.c: In function ‘getNumConverters’:
GeneralConverters.c:160: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:166: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c: In function ‘RPython_getConverterDescriptions’:
GeneralConverters.c:198: error: ‘RSFromTargetConverter’ has no member named 
‘description’
GeneralConverters.c:202: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:204: error: ‘RSToTargetConverter’ has no member named 
‘description’
GeneralConverters.c:205: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c: In function ‘fromTargetConverterDescription’:
GeneralConverters.c:223: error: ‘RSFromTargetConverter’ has no member named 
‘description’
GeneralConverters.c:224: error: ‘RSFromTargetConverter’ has no member named 
‘description’
GeneralConverters.c: In function ‘addFromTargetConverter’:
GeneralConverters.c:240: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:246: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:248: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c:251: error: ‘RSFromTargetConverter’ has no member named 
‘next’
GeneralConverters.c: At top level:
GeneralConverters.c:260: error: expected ‘)’ before ‘Rf_match’
GeneralConverters.c: In function ‘R_addFromPythonConverter’:
GeneralConverters.c:282: error: ‘FromPythonConverterMatch’ undeclared (first use 
in this function)
GeneralConverters.c:282: error: (Each undeclared identifier is reported only 
once
GeneralConverters.c:282: error: for each function it appears in.)
GeneralConverters.c:282: error: ‘m’ undeclared (first use in this function)
GeneralConverters.c:283: error: ‘FromPythonConverter’ undeclared (first use in 
this function)
GeneralConverters.c:283: error: ‘cvt’ undeclared (first use in this function)
GeneralConverters.c:286: error: expected expression before ‘)’ token
GeneralConverters.c:287: error: expected expression before ‘)’ token
GeneralConverters.c:289: warning: implicit declaration of function 
‘addFromTargetConverterInfo’
GeneralConverters.c: At top level:
GeneralConverters.c:298: error: expected declaration specifiers or ‘...’ before 
‘ToTargetConverter’
GeneralConverters.c: In function ‘addToTargetConverterInfo’:
GeneralConverters.c:303: error: ‘RSToTargetConverter’ has no member named 
‘converter’
GeneralConverters.c:303: error: ‘converter’ undeclared (first use in this 
function)
GeneralConverters.c:304: error: ‘RSToTargetConverter’ has no member named 
‘autoArray’
GeneralConverters.c:305: error: ‘RSToTargetConverter’ has no member named 
‘userData’
GeneralConverters.c:306: error: ‘RSToTargetConverter’ has no member named 
‘description’
GeneralConverters.c:307: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c: In function ‘addToTargetConverter’:
GeneralConverters.c:322: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c:326: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c:328: error: ‘RSToTargetConverter’ has no member named ‘next’
GeneralConverters.c:330: error: ‘RSToTargetConverter’ has no member named ‘next’
make: *** [GeneralConverters.o] Error 1
ERROR: compilation failed for package ‘RSPython’



More information about the R-help mailing list