[Qgis-developer] Qgis/Rpy Windows problem

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Jan 7 03:54:56 EST 2008

Could anyone using Qgis with the R statistics package via Rpy on Windows 
XP give me some help here?

I've had this working before, but with my own compiled-from-source Qgis. 
Recently I decided I'd try and get it working from distributed binaries 
for simplicity's sake.

So, I'm using:

  Qgis 0.9.1
  Python 2.5
  R 2.6
  Rpy 1.01 for R 2.6
  Other Rpy dependencies: numpy, pywin32

all from .exe or .msi files obtained from the respective web sites.

  Rpy works fine from a python shell started from the Start Menu. But 
when I run it from a Qgis Python console then R gives errors on reading 
its RConsole config file (in RHOME/etc/RConsole).

  The errors are on any blank lines and four of the config options. 
Remove blank lines and those four options, and it all works.

  This is very odd. The code in R that reads RConsole and generates the 
error seems to be purely file ops and string ops. I first thought it was 
some environment setting like language or encoding but it all looks the 
same from a Windows python console and a QGIS python console.

  So, if anyone out there has this combination working on Windows could 
you please let me know what versions of the software you've got, and 
whether they were installed from binaries or compiled yourself. If 
anyone has any idea why this might happen then that would be even mroe 
helpful. Also if anyone with a Windows box wants to try and duplicate 
this bug that would be handy too. At the moment I've had it fail on my 
Windows box and a clean Windows XP install on a Virtual Box machine.

  I'm also discussing this with the Rpy guys and the R devs too...



More information about the Qgis-developer mailing list