[GRASS-user] problems with r.learn.ml and python 3.7

Dear GRASS users,
I am having problems to use r.learn.ml. I am using OSGeo win10 version (7.6.1)
I installed scikit-learn using pip:

C:>python3 -m pip install scikit-learn

Requirement already satisfied: scikit-learn in c:\osgeo4w64\apps\python37\lib\site-packages (0.21.2)

Requirement already satisfied: scipy>=0.17.0 in c:\osgeo4w64\apps\python37\lib\site-packages (from scikit-learn) (1.1.0)

Requirement already satisfied: numpy>=1.11.0 in c:\osgeo4w64\apps\python37\lib\site-packages (from scikit-learn) (1.16.3)

Requirement already satisfied: joblib>=0.11 in c:\osgeo4w64\apps\python37\lib\site-packages (from scikit-learn) (0.13.2)

But when I ran the r.learn.ml I got this message:

r.learn.ml group=lsat7_2000 trainingmap=landclass96_roi output=rf_classification classifier=RandomForestClassifier n_estimators=500

ERROR: Scikit learn 0.18 or newer is not installed

(Sat Jun 22 13:55:02 2019) Command finished (4 sec)

I modified the python-core.bat file to point to python 3.7 this way:

SET PYTHONHOME=%OSGEO4W_ROOT%\apps\Python37

PATH %OSGEO4W_ROOT%\apps\Python37\Scripts;%PATH%

But GRASS is still using Python 2.7 as shown in the Python shell:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32

How can I make sure GRASS uses Python 3.7

Thanks in advance.

Jonathan Aguero-Valverde

Hi Jonathan,

On Mon, Jun 24, 2019 at 4:07 AM Jonathan Aguero <jaguero.ucr@gmail.com> wrote:

Dear GRASS users,
I am having problems to use r.learn.ml. I am using OSGeo win10 version (7.6.1)

You will need to switch to GRASS GIS 7.7.dev (upcoming 7.8) for Python3 support.

Binaries should be available from here
https://grass.osgeo.org/download/software/ms-windows/
--> OSGeo4W

but at time the compile chain is broken.
Maybe others can shed light on where to currently get G77 for Windows...

Best,
Markus

Markus

Markus Neteler wrote

Hi Jonathan,

On Mon, Jun 24, 2019 at 4:07 AM Jonathan Aguero &lt;

jaguero.ucr@

&gt; wrote:

Dear GRASS users,
I am having problems to use r.learn.ml. I am using OSGeo win10 version
(7.6.1)

You will need to switch to GRASS GIS 7.7.dev (upcoming 7.8) for Python3
support.

Binaries should be available from here
https://grass.osgeo.org/download/software/ms-windows/
--> OSGeo4W

but at time the compile chain is broken.
Maybe others can shed light on where to currently get G77 for Windows...

see https://lists.osgeo.org/pipermail/grass-dev/2019-June/092840.html

----------------

any chance to get back winGRASS dailys before? so we'll be able to flood
github issues with winGRASS issues... :wink:

yes, I will have time after July 1. Ma

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
----------------

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

Thanks for your answers. I'll wait for grass 7.8

Regards

Jonathan

El 6/24/2019 a las 3:11 AM, Helmut Kudrnovsky escribió:

Markus Neteler wrote

Hi Jonathan,

On Mon, Jun 24, 2019 at 4:07 AM Jonathan Aguero &lt;
jaguero.ucr@
&gt; wrote:

Dear GRASS users,
I am having problems to use r.learn.ml. I am using OSGeo win10 version
(7.6.1)

You will need to switch to GRASS GIS 7.7.dev (upcoming 7.8) for Python3
support.

Binaries should be available from here
https://grass.osgeo.org/download/software/ms-windows/
--> OSGeo4W

but at time the compile chain is broken.
Maybe others can shed light on where to currently get G77 for Windows...

see https://lists.osgeo.org/pipermail/grass-dev/2019-June/092840.html

----------------

any chance to get back winGRASS dailys before? so we'll be able to flood
github issues with winGRASS issues... :wink:

yes, I will have time after July 1. Ma

--
Ing. Jonathan Agüero Valverde, Ph.D.
Profesor e Investigador
Programa de Investigación en Desarrollo Urbano Sostenible (ProDUS)
Escuela de Ingeniería Civil
Universidad de Costa Rica
Tel: (506) 2511-2787, 2511-2777
jonathan.aguero@ucr.ac.cr