R-ArcGIS / r-bridge-install

Install the R ArcGIS Tools
Apache License 2.0
188 stars 59 forks source link

Install R-ArcGIS bridge using a virtual machine on a mac #116

Closed InsMoreno closed 1 year ago

InsMoreno commented 1 year ago

Hello,

To run ArcGIS Pro on a Windows virtual machine on my macOS I installed Parallels (version 18.2). AGP works well with this solution. (Note: I gave access to all the files in my mac to the virtual machine. And also runned AGP as an administrator.) Unfortunately I didn't manage to install completely the R-ArcGIS bridge, here is what I tried:


1) I followed the steps explained in the video:

Install R bindings
=====================
Parameters

Overwrite Existing Installation?     false
Selected R Version (Set As Default)     4.3.0
=====================
Messages

Start Time: Wednesday, April 26, 2023 15:47:27
Rscript.exe C:\Users\morenoin\AppData\Local\Temp\ArcGISProTemp5764\tmpindpu_hm\install.R
Installing package in 'C:/Users/morenoin/AppData/Local/R/win-library/4.3'
(since 'lib' is not specified)
Notice: Unable to access repository index https://r.esri.com/bin/windows/contrib/4.3:
unable to open URL 'https://r.esri.com/bin/windows/contrib/4.3/PACKAGES'
Notice message:
package 'arcgisbinding' is not available as a binary package for this version of R
A version of this package for your version of R may be available elsewhere,
See ideas at
Succeeded at Wednesday, April 26, 2023 15:47:32 (Elapsed Time: 4.70 seconds)

2) I went in the options of AGP -> Geoprocessing to see the detected R home directories: a) I tried to specify the R home directory in my mac and not in the virtual machine but it didn't work (the R home directory of the mac does not appear in the drop down menu, I find it when I browse but when I clic "open" it's like nothing happened). b) So I downloaded R and RStudio in the virtual machine, then selected the R home directory of the virtual machine, and I tried again to install R Bindings. Here are the R installation details:

R Installation Details
=====================
Parameters

R Installation Directory     C:\Program Files (x86)\R\R-4.3.0
R Package Library     C:\Program Files (x86)\R\R-4.3.0\library
ArcGIS binding version     
ArcGIS binding path     
=====================
Messages

Start Time: mercredi, 26 avril 2023 15:59:24
R (version 4.3.0), installed in: C:\Program Files (x86)\R\R-4.3.0
R packages will be installed into: C:\Program Files (x86)\R\R-4.3.0\library
All R package libraries detected: C:\Program Files (x86)\R\R-4.3.0\library
The ArcGIS R package is not installed. Use the 'Install R Bindings' tool to install it.
Succeeded at mercredi, 26 avril 2023 15:59:24 (Elapsed Time: 0,06 seconds)

3) I also tried to install it directly into R:

> install.packages("//Mac/Home/Downloads/arcgisbinding_1.0.1.244.zip", repos = NULL, type = "win.binary")
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/morenoin/AppData/Local/R/win-library/4.3’
(as ‘lib’ is unspecified)
package ‘arcgisbinding’ successfully unpacked and MD5 sums checked

> library(arcgisbinding)
> library(arcgisbinding)
Error: package or namespace load failed for ‘arcgisbinding’:
 package ‘arcgisbinding’ was installed before R 4.0.0: please re-install it.

However now it seems that 'arcgisbinding' is installed in ArcGIS Pro (see screenshot below). So it seems that the only problem now is the error message when I do > library(arcgisbinding) ... I tried to reinstall R (version 4.3) but I still have the same error message...

Capture d’écran 2023-04-27 à 17 19 18

Could someone please help me?

JosiahParry commented 1 year ago

I'm a bit lost here. I don't think we feel comfortable supporting a bootstrapped installation. However, I think this may be an issue with mismatched R versions and arcgisbinding versions.It looks like you hve R version 4.3 which was released 6 days ago. It also looks like you are installing a very old version of the arcgisbinding package. Can you reinstall arcgisbinding?

InsMoreno commented 1 year ago

Thank you very much for your quick response! I took the "latest version" of arcgisbinding that is in github... : Capture d’écran 2023-04-28 à 09 30 01

Capture d’écran 2023-04-28 à 09 31 50

So now I followed your advice: install R 4.2.3 then I did the command "install.packages("arcgisbinding", repos="https://r.esri.com", type="win.binary")" to get the latest version of arcgisbinding and it worked! Thanks a lot!

JosiahParry commented 1 year ago

Wonderful! Thanks for the update :) I'll make a follow up issue to get a new tagged release out for you.