<div dir="ltr">Hi Micha, <div><br></div><div>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. </div><div><br></div><div>Any Mac aficionados reading this - do you have an idea to resolve this? </div><div><br></div><div>Thanks</div><div>Daniel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 19, 2022 at 1:46 AM Micha Silver <<a href="mailto:tsvibar@gmail.com" target="_blank">tsvibar@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
<br>
On 19/02/2022 04:27, Daniel Kozar via grass-user wrote:<br>
> Hi everyone,<br>
><br>
> When using the extension "v.class.mlR" I get an error [Message 1] (see <br>
> below) that "Rscript" cannot be located. I traced this back to the <br>
> script for "v.class.mlR" and edited line 908 to read the direct path <br>
> to Rscript - '/usr/local/bin/Rscript' rather than 'Rscript' alone. <br>
> However, when I re-open GRASS 8.0 I get an error [Message 2] that the <br>
> extension failed when loading and that the operation isn't permitted. <br>
> I allowed for the application to have administrative rights but it <br>
> still doesn't work. Does anyone know how to work around this or solve <br>
> the issue finding "Rscript"?<br>
><br>
> I have R running and have installed necessary packages. I'm <br>
> running GRASS on MacOS Monterey.<br>
<br>
<br>
This looks like a Mac problem (which I know nothing about).<br>
<br>
To test, can you run, first from a terminal:<br>
<br>
micha@RMS:~$ Rscript -e "sessionInfo()"<br>
<br>
Now run the same from within a GRASS session:<br>
<br>
(here's what I get)<br>
<br>
micha@RMS:QGIS$ g.version<br>
GRASS <a href="http://8.1.dev" rel="noreferrer" target="_blank">8.1.dev</a> (2022)<br>
<br>
micha@RMS:QGIS$ Rscript -e "sessionInfo()"<br>
R version 4.1.2 (2021-11-01)<br>
Platform: x86_64-pc-linux-gnu (64-bit)<br>
Running under: Debian GNU/Linux 11 (bullseye)<br>
<br>
Matrix products: default<br>
BLAS: /usr/lib/x86_64-linux-gnu/<wbr>openblas-pthread/libblas.so.3<br>
LAPACK: /usr/lib/x86_64-linux-gnu/<wbr>openblas-pthread/<a href="http://libopenblasp-r0.3.13.so" rel="noreferrer" target="_blank">libopenblasp-<wbr>r0.3.13.so</a><br>
<br>
locale:<br>
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C<br>
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8<br>
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8<br>
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C<br>
[9] LC_ADDRESS=C LC_TELEPHONE=C<br>
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C<br>
<br>
attached base packages:<br>
[1] stats graphics grDevices utils datasets methods base<br>
<br>
loaded via a namespace (and not attached):<br>
[1] compiler_4.1.2<br>
<br>
If the Rscript executable is not found, then v.class.mlR cannot be run.<br>
<br>
<br>
><br>
> Any help would be appreciated.<br>
> - Daniel<br>
> ------------------------------<wbr>------------------------------<wbr>-----------------<br>
> *[Message 1]*<br>
><br>
> Running R now. Following output is R output.<br>
><br>
> Traceback (most recent call last):<br>
><br>
> File "/Users/dankozar/Library/<wbr>GRASS/8.0/Addons/scripts/v.<wbr>class.mlR", <br>
> line 977, in <module><br>
><br>
> main()<br>
><br>
> File "/Users/dankozar/Library/<wbr>GRASS/8.0/Addons/scripts/v.<wbr>class.mlR", <br>
> line 908, in main<br>
><br>
> subprocess.check_call(<br>
><br>
> File <br>
> "/Applications/GRASS-8.0.app/<wbr>Contents/Resources/lib/<wbr>python3.9/subprocess.py", <br>
> line 368, in check_call<br>
><br>
> retcode = call(*popenargs, **kwargs)<br>
><br>
> File <br>
> "/Applications/GRASS-8.0.app/<wbr>Contents/Resources/lib/<wbr>python3.9/subprocess.py", <br>
> line 349, in call<br>
><br>
> with Popen(*popenargs, **kwargs) as p:<br>
><br>
> File <br>
> "/Applications/GRASS-8.0.app/<wbr>Contents/Resources/lib/<wbr>python3.9/subprocess.py", <br>
> line 951, in __init__<br>
><br>
> self._execute_child(args, executable, preexec_fn, close_fds,<br>
><br>
> File <br>
> "/Applications/GRASS-8.0.app/<wbr>Contents/Resources/lib/<wbr>python3.9/subprocess.py", <br>
> line 1821, in _execute_child<br>
><br>
> raise child_exception_type(errno_<wbr>num, err_msg, err_filename)<br>
><br>
> FileNotFoundError: [Errno 2] No such file or directory: 'Rscript'<br>
><br>
><br>
> *[Message 2]*<br>
><br>
> Details: <[Errno 1] Operation not permitted: 'v.class.mlR'><br>
><br>
> WARNING: Some addons failed when loading. Please consider to update <br>
> your addons by running 'g.extension.all -f'.<br>
><br>
><br>
> -- <br>
> Thank you,<br>
><br>
> Daniel Kozar<br>
> PhD Candidate<br>
> UC Davis - Hydrologic Sciences<br>
> <a href="mailto:djkozar@ucdavis.edu" target="_blank">djkozar@ucdavis.edu</a><br>
> (814) 380-6900<br>
><br>
> ______________________________<wbr>_________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>
<br>
-- <br>
Micha Silver<br>
Ben Gurion Univ.<br>
Sde Boker, Remote Sensing Lab<br>
cell: +972-523-665918<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Thank you, <div><br><div>Daniel Kozar</div><div>Graduate Student</div></div><div>UC Davis - Hydrologic Sciences</div><div><a href="mailto:djkozar@ucdavis.edu" target="_blank">djkozar@ucdavis.edu</a></div><div>(814) 380-6900</div></div></div>
<br><br>-- <br><div dir="ltr">Thank you, <div><br><div>Daniel Kozar</div><div>Graduate Student</div></div><div>UC Davis - Hydrologic Sciences</div><div><a href="mailto:djkozar@ucdavis.edu" target="_blank">djkozar@ucdavis.edu</a></div><div>(814) 380-6900</div></div><br>