[R] Interfacing R and Python in MS Windows

"Héctor Villafuerte D." hec.villafuerte at telgua.com.gt
Tue Dec 9 18:39:19 CET 2003


Uwe Ligges wrote:

> Héctor Villafuerte D. wrote:
>
>> Hi all,
>> I need the power of R from within some of my Python programs...
>> I use debian linux (woody) at home and windows XP at work (the
>> latter is where I need to get things done!)
>>
>> This are my packages:
>> R 1.8.0
>> Python 2.3
>> RSPython 0.5-3
>>
>> This is what I've done:
>> (1) Since the Windows Binary of RSPython is compiled against
>> Python 2.2 I downloaded the tarball
>> (2) Followed the instructions in INSTALL.win (with pexports and
>> everything)
>> (3) In the RGUI "Install package(s) from local zip files..."
>
>
> If you have downloaded the tarball of RSPython, you have to install 
> the package using Rcmd INSTALL, and you cannot use the RGUI which is 
> designed to install binary packages.
>
> Uwe Ligges
>
>
>> (4) NO errors reported during this process
>> (5) When I try to "Load package" in R it show this error:
>>  > local({pkg <- select.list(sort(.packages(all.available = TRUE)))
>> + if(nchar(pkg)) library(pkg, character.only=TRUE)})
>> Error in testRversion(descfields) : This package has not been 
>> installed properly
>> See the Note in ?library
>>
>> (6) In Python
>>  >>> import RS
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in ?
>> ImportError: No module named RS
>>
>> Please help me to get this excelent tools going on in Windows.
>> Thanks in advance,
>> Hector 
>

Thanks for your help guys.
Tim: I had already seen RPy; but its Windows binary is compiled against
Python 2.2 (and I have 2.3) so it didn't work.

Uwe:
(1) I installed Active Perl (it seems to be needed by Rcmd INSTALL)
(2) I then created a tar.gz with the modifications found in INSTALL.WIN
(3) Here's what I got:

E:\to_do>Rcmd INSTALL -c e:/to_do/RSPython.tar.gz

---------- Making package RSPython ------------

   **********************************************
   WARNING: this package has a configure script
         It probably needs manual configuration
   **********************************************

  installing inst files
A package must contain a DESCRIPTION file
make[1]: *** [frontmatter] Error 27
make: *** [pkg-RSPython] Error 2
*** Installation of RSPython failed ***
make --no-print-directory DLLNM= RHOME=C:/PROGRA~1/R/rw1080 BUILD=MINGW \
  -C E:/to_do/R.INSTALL/RSPython PKG=RSPython -f 
C:/PROGRA~1/R/rw1080/src/gnuwin32/MakePkg clean
make: *** [pkgclean-RSPython] Error 255

What's a description file? Any suggestions compiling this?
Thanks again in advance,
Hector




More information about the R-help mailing list