Trouble running R Integration.pyt toolbox w/ ArcGIS pro

2710
16
Jump to solution
10-11-2017 12:50 PM
PhilippeLachapelle
New Contributor

Hi,

I'm trying to setup my work environment to start using ArcGIS pro with R but I'm having trouble running the R Integration python's script.

I have downloaded the Bridge, I have R studio 3.3.2 and ArcGIS Pro (12.0.0.8933 - free demo trial).

When I add the R Integration.pyt toolbox I don't see any of the 4 scripts showing up?

I have attached 2 images resuming the situation.

Any idea what I can do to fox this?

Regards

Philippe

Tags (1)
0 Kudos
16 Replies
ThomasTisserant
New Contributor

Thanks Marjean,

1) The script failed most likely because of some internet restrictions in my office, as I've experienced this error several times in other contexts like in the installation of some R packages. I'll try again at home.

Install R bindings error - unable to access online package

2) The package was successfully unpacked in the R console, but after reopening ArcGIS the ArcGIS R integration package was still not detected under Options>Geoprocessing.

So I still have 1) to finalize and I'll update my result after I can fully try it.

0 Kudos
MarjeanPobuda
Occasional Contributor

Thomas,

Thank you for all of your time in trying out these different options. I am sorry this is proving to be so complicated. Based on your comment though, it sounds like if you make a minor tweak, you should be able to get the bridge installed. 

1) I have a feeling this might not work, but if you have time, try following the instructions for an offline installation of the bridge. 

Offline Installation

  • From a machine that does have internet access:
  • Copy both zip files onto the machine that you're targeting offline installation. Extract the r-bridge-install zip. Place the arcgisbinding_1.0.0.128.zip into the same directory as the "R Integration" Python toolbox.
  • Run the installation procedure as you previously did in 1) 

That error message saying, "Unable to access online package, and no local copy of package found." should be gone but, my guess is that there will still be some type of folder issue error since something about that structure on your machine is different than expected. I am mostly just curious what it will say ... 

2) So it appears that R was able to install the package ... but not in the expected location of C:\Users\<insert-your-user-name-here>\Documents\R\win-library\3.3. So where did it install? A couple of things:

   - First, copy the arcgisbinding folder that is located inside of your zipped folder and manually paste it in your ...\Documents\R\win-library\3.3 folder. 

   - In R, run the following:

      library(arcgisbinding)

      arc.check_product()

You should have succeeded in, hopefully, beating the system and having both R and ArcGIS now recognize the arcgisbinding package and therefore, have the bridge installed. 

*Fingers crossed,

Marjean

0 Kudos
ThomasTisserant
New Contributor

I tried again the installation 1) but from home this time and the installation succeeded, albeit with some warnings.

Then I went to options>Geoprocessing and still saw "Please install the ArcGIS R integration package".

I decided to keep going through the tutorial on http://learn.arcgis.com/en/projects/analyze-crime-using-statistics-and-the-r-arcgis-bridge/ to see if I could do it anyway, and I was able to go through all the lessons!

Maybe if I had tried to keep going from the beginning it would have worked right away, or maybe it's the installation from home that made it worked. I'm not sure. I just wanted to report back, and thank you for the debugging solutions.

0 Kudos
ThomasTisserant
New Contributor

I've just solved another R/GitHub problem that looks related to what was happening here.

Here there is a problem with the folder "C:\Program Files\R\" that's in the path of my R installation.

I suspect that the space character in "Program Files" is messing things up. If I had installed R under  "C:\R\" then I might not have had this problem.

Just writing this here for future readers!

0 Kudos
DanPatterson_Retired
MVP Emeritus

even Microsoft recommends putting paths with spaces in them in quotes.

Such a simple thing so many years ago continues to haunt them.

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Note that the R-ArcGIS installation toolbox does take efforts to handle this -- all of its paths are quoted (mostly by the subprocess module), and it first modifies the path to be set to the location of the R executable. Despite that, I've seen some occasional issues come up like this one, but haven't been able to reproduce them locally yet.

Cheers, SHaun

0 Kudos
DanPatterson_Retired
MVP Emeritus

It isn't you guys... it is Microsoft... you think they would have addressed it during some incarnation of windows, yet c:\program files.... still exists and allowing spaces in 'users' etc

0 Kudos