Re: [GRASS-user] Rscript error when using v.class.mlR

2023-07-17 Thread Jamille Haarloo
Thank you Helmut.
Is it best to go back to the previous versions for the meantime?

On Mon, Jul 17, 2023 at 4:20 PM Helmut Kudrnovsky  wrote:

> >ok, I misunderstood. I'm getting a similar response.
> >C:\Users\haarlooj\Documents>Rscript -e "sessionInfo()"
> >'Rscript' is not recognized as an internal or external command,
> >operable program or batch file.
>
> the reason is that the Rbatch-files from OSGeo4W version 1 (
> https://download.osgeo.org/osgeo4w/v1/x86_64/release/rbatch/) are not yet
> included in OSGeo4W version 2 (compare
> https://download.osgeo.org/osgeo4w/v2/x86_64/release/).
>
> winGRASS 8 is based upon OSGeo4W version 2.
>
> kind regards
> Helmut
>
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Rscript error when using v.class.mlR

2023-07-17 Thread Helmut Kudrnovsky
>ok, I misunderstood. I'm getting a similar response.
>C:\Users\haarlooj\Documents>Rscript -e "sessionInfo()"
>'Rscript' is not recognized as an internal or external command,
>operable program or batch file.

the reason is that the Rbatch-files from OSGeo4W version 1 
(https://download.osgeo.org/osgeo4w/v1/x86_64/release/rbatch/) are not yet 
included in OSGeo4W version 2 (compare 
https://download.osgeo.org/osgeo4w/v2/x86_64/release/).

winGRASS 8 is based upon OSGeo4W version 2.

kind regards
Helmut

___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Rscript error when using v.class.mlR

2023-07-17 Thread Jamille Haarloo
ok, I misunderstood. I'm getting a similar response.
C:\Users\haarlooj\Documents>Rscript -e "sessionInfo()"
'Rscript' is not recognized as an internal or external command,
operable program or batch file.

On Mon, Jul 17, 2023 at 11:07 AM Micha Silver  wrote:

>
> On 17/07/2023 16:56, Jamille Haarloo wrote:
>
> Thank you Micha,
>
> This was the msg following "C:\Users\haarlooj\Documents> sessionInfo()":
> 'sessionInfo' is not recognized as an internal or external command,
> operable program or batch file.
>
> What you need to try is:
>
>
> Rscript -e "sessionInfo()"
>
>
> The GRASS module v.class.mlR  needs to be able to "find" the Rscript
> executable in order to run.
>
>
> I looked for the location and found this as location of R:
> C:\Program Files\R\R-4.3.0\bin\x64
> Location for Rstudio:
> C:\Program Files\RStudio
>
> Is it correct that I need to change the paths? What is the best method?
>
> Best,
> Jamille
>
>
> On Sat, Jul 15, 2023 at 9:17 AM Micha Silver  wrote:
>
>> Hi Jamille
>>
>>
>> On 15/07/2023 2:04, Jamille Haarloo wrote:
>> > Dear all,
>> >
>> > What was the solution to this error? I recently got a similar error
>> > from the same module v.class.mlR. I am using GRASS GIS 8.2.1  on
>> > Windows 10.
>> >
>>
>> The previous post was in reference to MacOS. Can you check on your
>> system that the Rscript executable is available from the GRASS command
>> window? i.e.
>>
>> - start grass (even without the GUI)
>>
>> - go to the command shell
>>
>> - run Rscript -e "sessionInfo()"
>>
>>
>> This will identify if the problem is due to missing PATH in the env
>> variables.
>>
>>
>>
>> > Best,
>> > Jamille
>> >
>> > 
>> > Running R now. Following output is R output.
>> > Traceback (most recent call last):
>> >   File "C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri
>> > pts\v.class.mlR.py ", line 977, in 
>> > main()
>> >   File "C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri
>> > pts\v.class.mlR.py ", line 908, in main
>> > subprocess.check_call(
>> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
>> > 368, in check_call
>> > retcode = call(*popenargs, **kwargs)
>> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
>> > 349, in call
>> > with Popen(*popenargs, **kwargs) as p:
>> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
>> > 951, in __init__
>> > self._execute_child(args, executable, preexec_fn,
>> > close_fds,
>> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
>> > 1420, in _execute_child
>> > hp, ht, pid, tid = _winapi.CreateProcess(executable,
>> > args,
>> > FileNotFoundError: [WinError 2] The system cannot find the
>> > file specified
>> >
>> >
>> > On Sun, Feb 20, 2022 at 8:24 AM Nicklas Larsson via grass-user
>> >  wrote:
>> >
>> > Daniel,
>> >
>> > I assume you use the official GRASS app bundle for mac. If you are
>> > not using the final 8.0.0 version, but one of the release
>> > candidates, I'd suggest you download the latest. There are changes
>> > in the startup script in the final version that relate to PATH
>> > issues like this.
>> >
>> >
>> >
>> > Best,
>> > Nicklas
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Sunday, 20 February 2022, 01:55:28 CET, Daniel Kozar via
>> > grass-user  wrote:
>> >
>> >
>> >
>> >
>> >
>> > Hi Micha,
>> >
>> > Thanks for the reply. I ran the script lines you sent both in the
>> > terminal as well as a GRASS session. Rscript is recognized in the
>> > terminal command but not in the GRASS 8.0 command. Since GRASS 8.0
>> > did not recognize Rscript I tried making a symbolic link for
>> > "Rscript" to the full path: /usr/local/bin/Rscript. This still
>> > doesn't recognize the command and I'm unsure how else to work
>> > around it.
>> >
>> > Any Mac aficionados reading this - do you have an idea to resolve
>> > this?
>> >
>> > Thanks
>> > Daniel
>> >
>> > On Sat, Feb 19, 2022 at 1:46 AM Micha Silver 
>> > wrote:
>> > > Hi
>> > >
>> > >
>> > > On 19/02/2022 04:27, Daniel Kozar via grass-user wrote:
>> > >> Hi everyone,
>> > >>
>> > >> When using the extension "v.class.mlR" I get an error [Message
>> > 1] (see
>> > >> below) that "Rscript" cannot be located. I traced this back to
>> the
>> > >> script for "v.class.mlR" and edited line 908 to read the direct
>> > path
>> > >> to Rscript - '/usr/local/bin/Rscript' rather than 'Rscript'
>> alone.
>> > >> However, when I re-open GRASS 8.0 I get an error [Message 2]
>> > that the
>> > >> extension failed when loading and that the operation isn't
>> > permitted.
>> > >> I allowed for the application to have administrative rights but
>> it
>> > >> still doesn't work. Does anyone know how to work around this or
>> > solve
>> > >> the issue finding "Rscript"?
>> > >>
>> > >> I have R running and have 

Re: [GRASS-user] Rscript error when using v.class.mlR

2023-07-17 Thread Micha Silver

  
  


On 17/07/2023 16:56, Jamille Haarloo
  wrote:


  
  Thank you Micha, 


This was the msg following "C:\Users\haarlooj\Documents>
  sessionInfo()": 
  'sessionInfo'
is not recognized as an internal or external command,
operable program or batch file.



  

What you need to try is:


Rscript -e "sessionInfo()"


The GRASS module v.class.mlR 
  needs to be able to "find" the Rscript executable in order to run.



  
I looked for the location and found this as location of R: 
  C:\Program Files\R\R-4.3.0\bin\x64

Location for Rstudio:
  C:\Program Files\RStudio



Is it correct that I need to change the paths? What is the
  best method?


Best,
Jamille


  
  
  
On Sat, Jul 15, 2023 at
  9:17 AM Micha Silver 
  wrote:

Hi
  Jamille
  
  
  On 15/07/2023 2:04, Jamille Haarloo wrote:
  > Dear all,
  >
  > What was the solution to this error? I recently got a
  similar error 
  > from the same module v.class.mlR. I am using GRASS GIS
  8.2.1  on 
  > Windows 10.
  >
  
  The previous post was in reference to MacOS. Can you check on
  your 
  system that the Rscript executable is available from the GRASS
  command 
  window? i.e.
  
  - start grass (even without the GUI)
  
  - go to the command shell
  
  - run Rscript -e "sessionInfo()"
  
  
  This will identify if the problem is due to missing PATH in
  the env 
  variables.
  
  
  
  > Best,
  > Jamille
  >
  > 
  > Running R now. Following output is R output.
  > Traceback (most recent call last):
  >   File
  "C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri
  > pts\v.class.mlR.py
  ",
  line 977, in 
  >     main()
  >   File
  "C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri
  > pts\v.class.mlR.py
  ",
  line 908, in main
  >     subprocess.check_call(
  >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
  > 368, in check_call
  >     retcode = call(*popenargs, **kwargs)
  >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
  > 349, in call
  >     with Popen(*popenargs, **kwargs) as p:
  >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
  > 951, in __init__
  >     self._execute_child(args, executable, preexec_fn,
  > close_fds,
  >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
  > 1420, in _execute_child
  >     hp, ht, pid, tid = _winapi.CreateProcess(executable,
  > args,
  > FileNotFoundError: [WinError 2] The system cannot find
  the
  > file specified
  >
  >
  > On Sun, Feb 20, 2022 at 8:24 AM Nicklas Larsson via
  grass-user 
  > 
  wrote:
  >
  >     Daniel,
  >
  >     I assume you use the official GRASS app bundle for
  mac. If you are
  >     not using the final 8.0.0 version, but one of the
  release
  >     candidates, I'd suggest you download the latest.
  There are changes
  >     in the startup script in the final version that
  relate to PATH
  >     issues like this.
  >
  >
  >
  >     Best,
  >     Nicklas
  >
  >
  >
  >
  >
  >
  >
  >     On Sunday, 20 February 2022, 01:55:28 CET, Daniel
  Kozar via
  >     grass-user 
  wrote:
  >
  >
  >
  >
  >
  >     Hi Micha,
  >
  >     Thanks for the reply. I ran the script lines you sent
  both in the
  >     terminal as well as a GRASS session. Rscript is
  recognized in the
  >     terminal command but not in the GRASS 8.0 command.
  Since GRASS 8.0
  >     did not recognize Rscript I tried making a symbolic
  link for
  >     "Rscript" to the full path: /usr/local/bin/Rscript.
  This still
  >     doesn't recognize the command and I'm unsure how else
  to work
  >     around it.
  >
  >   

Re: [GRASS-user] Rscript error when using v.class.mlR

2023-07-17 Thread Jamille Haarloo
Thank you Micha,

This was the msg following "C:\Users\haarlooj\Documents> sessionInfo()":
'sessionInfo' is not recognized as an internal or external command,
operable program or batch file.

I looked for the location and found this as location of R:
C:\Program Files\R\R-4.3.0\bin\x64
Location for Rstudio:
C:\Program Files\RStudio

Is it correct that I need to change the paths? What is the best method?

Best,
Jamille


On Sat, Jul 15, 2023 at 9:17 AM Micha Silver  wrote:

> Hi Jamille
>
>
> On 15/07/2023 2:04, Jamille Haarloo wrote:
> > Dear all,
> >
> > What was the solution to this error? I recently got a similar error
> > from the same module v.class.mlR. I am using GRASS GIS 8.2.1  on
> > Windows 10.
> >
>
> The previous post was in reference to MacOS. Can you check on your
> system that the Rscript executable is available from the GRASS command
> window? i.e.
>
> - start grass (even without the GUI)
>
> - go to the command shell
>
> - run Rscript -e "sessionInfo()"
>
>
> This will identify if the problem is due to missing PATH in the env
> variables.
>
>
>
> > Best,
> > Jamille
> >
> > 
> > Running R now. Following output is R output.
> > Traceback (most recent call last):
> >   File "C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri
> > pts\v.class.mlR.py ", line 977, in 
> > main()
> >   File "C:\Users\haarlooj\AppData\Roaming\GRASS8\addons\scri
> > pts\v.class.mlR.py ", line 908, in main
> > subprocess.check_call(
> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
> > 368, in check_call
> > retcode = call(*popenargs, **kwargs)
> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
> > 349, in call
> > with Popen(*popenargs, **kwargs) as p:
> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
> > 951, in __init__
> > self._execute_child(args, executable, preexec_fn,
> > close_fds,
> >   File "C:\OSGeo4W\apps\Python39\lib\subprocess.py", line
> > 1420, in _execute_child
> > hp, ht, pid, tid = _winapi.CreateProcess(executable,
> > args,
> > FileNotFoundError: [WinError 2] The system cannot find the
> > file specified
> >
> >
> > On Sun, Feb 20, 2022 at 8:24 AM Nicklas Larsson via grass-user
> >  wrote:
> >
> > Daniel,
> >
> > I assume you use the official GRASS app bundle for mac. If you are
> > not using the final 8.0.0 version, but one of the release
> > candidates, I'd suggest you download the latest. There are changes
> > in the startup script in the final version that relate to PATH
> > issues like this.
> >
> >
> >
> > Best,
> > Nicklas
> >
> >
> >
> >
> >
> >
> >
> > On Sunday, 20 February 2022, 01:55:28 CET, Daniel Kozar via
> > grass-user  wrote:
> >
> >
> >
> >
> >
> > Hi Micha,
> >
> > Thanks for the reply. I ran the script lines you sent both in the
> > terminal as well as a GRASS session. Rscript is recognized in the
> > terminal command but not in the GRASS 8.0 command. Since GRASS 8.0
> > did not recognize Rscript I tried making a symbolic link for
> > "Rscript" to the full path: /usr/local/bin/Rscript. This still
> > doesn't recognize the command and I'm unsure how else to work
> > around it.
> >
> > Any Mac aficionados reading this - do you have an idea to resolve
> > this?
> >
> > Thanks
> > Daniel
> >
> > On Sat, Feb 19, 2022 at 1:46 AM Micha Silver 
> > wrote:
> > > Hi
> > >
> > >
> > > On 19/02/2022 04:27, Daniel Kozar via grass-user wrote:
> > >> Hi everyone,
> > >>
> > >> When using the extension "v.class.mlR" I get an error [Message
> > 1] (see
> > >> below) that "Rscript" cannot be located. I traced this back to the
> > >> script for "v.class.mlR" and edited line 908 to read the direct
> > path
> > >> to Rscript - '/usr/local/bin/Rscript' rather than 'Rscript' alone.
> > >> However, when I re-open GRASS 8.0 I get an error [Message 2]
> > that the
> > >> extension failed when loading and that the operation isn't
> > permitted.
> > >> I allowed for the application to have administrative rights but it
> > >> still doesn't work. Does anyone know how to work around this or
> > solve
> > >> the issue finding "Rscript"?
> > >>
> > >> I have R running and have installed necessary packages. I'm
> > >> running GRASS on MacOS Monterey.
> > >
> > >
> > > This looks like a Mac problem (which I know nothing about).
> > >
> > > To test, can you run, first from a terminal:
> > >
> > > micha@RMS:~$ Rscript -e "sessionInfo()"
> > >
> > > Now run the same from within a GRASS session:
> > >
> > > (here's what I get)
> > >
> > > micha@RMS:QGIS$ g.version
> > > GRASS 8.1.dev  (2022)
> > >
> > > micha@RMS:QGIS$ Rscript -e "sessionInfo()"
> > > R version 4.1.2 (2021-11-01)
> > > Platform: x86_64-pc-linux-gnu (64-bit)
> > >