Opened 14 years ago

Last modified 5 years ago

#1290 reopened defect

WinGrass: v.krige not working due to missing rpy2 pkg for MS Windows

Reported by: hellik Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Addons Version: svn-develbranch6
Keywords: wingrass, v.krige Cc:
CPU: x86-32 Platform: MSWindows Vista

Description

tested with a self compiled wingrass65 at r45511

v.krige.py                                                                      
Loading dependencies, please wait...
Traceback (most recent call last):
  File "c:/osgeo4w/usr/src/grass6_devel/dist.i686-pc-
mingw32/scripts/v.krige.py", line 421, in <module>
    main()
  File "c:/osgeo4w/usr/src/grass6_devel/dist.i686-pc-
mingw32/scripts/v.krige.py", line 306, in main
    importR()
  File "c:/osgeo4w/usr/src/grass6_devel/dist.i686-pc-
mingw32/scripts/v.krige.py", line 403, in importR
    import rpy2.robjects as robjects
  File "C:\OSGeo4W\apps\Python25\lib\site-
packages\rpy2\robjects\__init__.py", line 12, in <module>
    import rpy2.rinterface as rinterface
  File "C:\OSGeo4W\apps\Python25\lib\site-
packages\rpy2\rinterface\__init__.py", line 52, in <module>
    raise RuntimeError("Unable to locate R.dll within %s" %
R_HOME)
RuntimeError: Unable to locate R.dll within C:\Program
Files\R\R-2.12.1
Unable to locate R.dll within C:\Program Files\R\R-2.12.1

R changed in one of the last versions the location of R.dll in windows to C:\Program Files\R\R-2.12.1\bin\i386

Helmut

Change History (18)

comment:1 by aghisla, 14 years ago

Hello Helmut,

from version 2.12 the R executables are in a folder not scanned by rpy2, as you pointed out. The solution is edit RHOME system variable to point to the right folder (i.e. full path to R executable minus /bin/R.exe).

Sadly there is no longer support for rpy2 under Windows: http://rpy.sourceforge.net/rpy2/doc-2.1/html/overview.html#installation "There is currently no binaries or support for Microsoft Windows (more for lack of ressources than anything else)."

Anne

comment:2 by hamish, 12 years ago

Hi,

any new news?

comment:3 by aghisla, 12 years ago

No, I'm afraid.

rpy2 developer Laurent Gautier will work on Windows packaging only if sponsored. I know that some users managed to compile rpy2 from source on Windows - but have no fresh news.

I am open to consider a Python library for kriging, as replacement for R, if its implementation is not too low-level.

Sorry for inconvenience, Anne

in reply to:  3 comment:4 by hamish, 12 years ago

Replying to aghisla:

I am open to consider a Python library for kriging, as replacement for R, if its implementation is not too low-level.

I always thought one of the nice things about v.kridge is its ability to act as an example of how to write code that passes processing tools between GRASS and R, and from that perspective I'd be sorry to see the R dependency go away. It opens the door to *.

Hamish

comment:5 by hamish, 12 years ago

Summary: Wingrass65 - v.krige not workingWinGrass: v.krige not working due to missing rpy2 pkg for MS Windows

comment:6 by aghisla, 11 years ago

MarkusN suggested me to put a condition in the Makefile, like i.fft module does, and skip v.krige compilation if dependencies are missing.

Actually the only dependency visible at compile time is python-rpy2, that I plan to remove. In order to fix the compilation error with present codebase, I'd appreciate suggestions on how to check this Python dependency in the Makefile.

Would it make sense to make a new configuration parameter, like --with-R ?

Ideas welcome!

Many thanks, Anne

in reply to:  6 ; comment:7 by hellik, 9 years ago

Resolution: wontfix
Status: newclosed

Replying to aghisla:

MarkusN suggested me to put a condition in the Makefile, like i.fft module does, and skip v.krige compilation if dependencies are missing.

Actually the only dependency visible at compile time is python-rpy2, that I plan to remove. In order to fix the compilation error with present codebase, I'd appreciate suggestions on how to check this Python dependency in the Makefile.

Would it make sense to make a new configuration parameter, like --with-R ?

Ideas welcome!

Many thanks, Anne

tested with

System Info                                                                     
GRASS version: 7.0.3RC1                                                         
GRASS SVN Revision: 67443                                                       
Build Date: 2015-12-31                                                          
Build Platform: i386-w64-mingw32                                                
GDAL/OGR: 1.11.3                                                                
PROJ.4: 4.9.2                                                                   
GEOS: 3.5.0                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
v.krige                                                                         
Loading dependencies, please wait...
ERROR: Python module 'Rpy2' not found. Please install it and re-run v.krige.

from http://rpy.sourceforge.net/rpy2/doc-2.1/html/overview.html#installation

Microsoft’s Windows precompiled binaries

If available, the executable can be run; this will install the package in the default Python installation.

For few releases in the 2.0.x series, Microsoft Windows binaries were contributed by Laurent Oget from Predictix.

There is currently no binaries or support for Microsoft Windows (more for lack of ressources than anything else).

changing ticket to wontfix as rpy2's windows binaries are no longer available.

in reply to:  7 ; comment:8 by hellik, 9 years ago

Milestone: 6.5.07.0.4
Resolution: wontfix
Status: closedreopened

Replying to hellik:

v.krige                                                                         
Loading dependencies, please wait...
ERROR: Python module 'Rpy2' not found. Please install it and re-run v.krige.

available rpy2 package in osgeo4w:

osgeo4w 32bit
rpy2 2.3.9.

osgeo4w 64bit
rpy2 2.3.9.

from https://pypi.python.org/pypi/rpy2

rpy2 2.7.6

with these old packages in osgeo4w, there is still the same issue that R.dll can't be found:

v.krige                                                                         
Loading dependencies, please wait...
Traceback (most recent call last):
  File
"C:\OSGEO4~2\apps\grass\grass-7.0.3RC1/scripts/v.krige.py",
line 424, in <module>
    main()
  File
"C:\OSGEO4~2\apps\grass\grass-7.0.3RC1/scripts/v.krige.py",
line 302, in main
    importR()
  File
"C:\OSGEO4~2\apps\grass\grass-7.0.3RC1/scripts/v.krige.py",
line 403, in importR
    import rpy2.robjects as robjects
  File "C:\OSGEO4~2\apps\Python27\lib\site-
packages\rpy2\robjects\__init__.py", line 15, in <module>
    import rpy2.rinterface as rinterface
  File "C:\OSGEO4~2\apps\Python27\lib\site-
packages\rpy2\rinterface\__init__.py", line 90, in <module>
    raise RuntimeError("Unable to locate R.dll within %s" %
R_HOME)
RuntimeError: Unable to locate R.dll within
C:\PROGRA~1\R\R-32~1.3

reopen the ticket as: if a newer rpy2 package may be available in osgeo4w, this issue may be solved.

in reply to:  8 ; comment:9 by hellik, 9 years ago

Replying to hellik:

reopen the ticket as: if a newer rpy2 package may be available in osgeo4w, this issue may be solved.

suggest to disable v.krige in winGRASS until upstream osgeo4w rpy2 may be updated. I'll open a ticket there.

in reply to:  9 comment:10 by hellik, 9 years ago

Replying to hellik:

I'll open a ticket there.

see https://trac.osgeo.org/osgeo4w/ticket/480

comment:11 by martinl, 9 years ago

Milestone: 7.0.47.0.5

comment:12 by martinl, 8 years ago

Still the issue?

in reply to:  12 comment:13 by hellik, 8 years ago

Replying to martinl:

Still the issue?

yes.

before installing osgeo4w 64bit rpy2 2.3.9.:

v.krige                                                                         
Loading dependencies, please wait...
ERROR: Python module 'Rpy2' not found. Please install it and re-run v.krige.

after installing osgeo4w 64bit rpy2 2.3.9.:

v.krige                                                                         
Loading dependencies, please wait...
Traceback (most recent call last):
  File
"C:\OSGEO4~1\apps\grass\grass-7.3.svn/scripts/v.krige.py",
line 457, in <module>
    main()
  File
"C:\OSGEO4~1\apps\grass\grass-7.3.svn/scripts/v.krige.py",
line 329, in main
    importR()
  File
"C:\OSGEO4~1\apps\grass\grass-7.3.svn/scripts/v.krige.py",
line 436, in importR
    import rpy2.robjects as robjects
  File "C:\OSGEO4~1\apps\Python27\lib\site-
packages\rpy2\robjects\__init__.py", line 18, in <module>
    from rpy2.robjects.robject import RObjectMixin, RObject
  File "C:\OSGEO4~1\apps\Python27\lib\site-
packages\rpy2\robjects\robject.py", line 5, in <module>
    rpy2.rinterface.initr()
RuntimeError: R_HOME not defined.

it's still a too old rpy2 version in osgeo4w.

comment:14 by neteler, 8 years ago

Component: VectorAddons
Priority: majornormal

Note: v.krige was moved to addons, see #3136 for details

comment:15 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:16 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:17 by martinl, 6 years ago

Milestone: 7.0.7

Remove Milestone from Addons bugreports.

comment:18 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.