[AniMov] almost there with OpenSuSE 11.3 , R, QGIS and Homerange plugin

Anne Ghisla a.ghisla at gmail.com
Sun Oct 3 12:17:52 CEST 2010

On Fri, 2010-09-24 at 15:36 -0400, G. Paolo Sanino V. wrote:
> Hi,

Hi Gianpaolo,

> A lot has been done, searched and found, and it is almost there.
> The error is that cannot load Rpy2, despite it has been installed.
> This is an attempt to get it working using GUI and for newbies (as
> myself). Here I added all the packages that solved the many
> dependencies that raised in during this challenge.
> The box is an AMD64 box with OpenSuSE 11.3 installed from scratch
> Then this is what I have done so far:
> Using the one-click tool at the http://software.opensuse.org and/or
> adding the repositories with Yast2:
> http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.3/
> http://download.opensuse.org/repositories/science/openSUSE_11.3/
> I installed:
> qgis (version
> R-base (version 2.11.1-1.14)
> R-base-devel
> Rkward (to use R through a GUI)
> Before to add the homerange plugin in Qgis, it is stated to add some
> dependencies for R (adehabitat, rgdal, shapefiles, gpclib). But it is
> not that simple to get them; they have their own several dependencies
> and some need to be compiled with C++, while others with Fortran. So
> we need also those compilers. In simple, I went through each one and
> develop a the list of packages needed to be installed to get the R
> dependencies satisfied. Therefore, using Yast2 again, these are the
> next needed rpm packages :
> make, gcc, gcc-c++, gcc-fortran, tk-devel, xorg-x11-devel
> gdal (needed to add under R, the package rgdal)
> python-gdal
> libgdal1-devel
> python-rpy2 (2.0.6-7.1) this is to get Rpy2 (but is not found by
> Yast2 installed them and their own dependencies as well. Without
> adding the previous packages, under R, the dependencies were never
> satisfied despite being downloaded, because were not able to be
> compiled and installed.
> Then, after having these packaged installed, as ROOT I used RKward
> (the R GUI in KDE linux), to add the packages for R. The used
> repository was UCLA . The selected R packages to be selected and
> installed were:
> rgdal
> shapefile
> gpclib
> adehabitat
> The installation went great with no problem, automatically getting the
> dependencies for each of these packages.
> Then, having R done, I opened Qgis to install the Homerange plugin.
> However, every time I open qgis, I get the error of not being able to
> load Rpy2, despite the package that provides it was installed.

> Any hint?

Yes, one: is QGIS using the same Python where you installed rpy2?
You can check that opening python from a terminal, and type:

 import sys
 print sys.version

then open QGIS, open the Python console (Plugins > Python console) and
type the same commands. If the versions are different, it probably means
that QGIS has installed its own Python and that you installed rpy2 on
the system's one.
Any extra hint from Suse users is welcome :)

in the QGIS Python console you can also type:

 import rpy2 as rpy2
 import rpy2.robjects as ro

and report the Python errors - they are more informative than

hope this helps,

More information about the AniMov mailing list