Select to view content in your preferred language

Cannot install R-bridge on Parallels virtual machine

1225
2
Jump to solution
09-11-2018 10:01 AM
RachelField
Emerging Contributor

I am trying to install R-bridge in ArcGIS desktop, which I run in Parallels virtual machine on my Macbook pro. I have 'R version 3.5.1 for Windows' as well as 'R version 3.3.2 for mac' installed. When I run the Install R Bindings script within ArcMap, I get the following output, thus R-bridge fails to install:

~~~

Executing: InstallBindings true 3.5.1

Start Time: Tue Sep 11 09:50:53 2018

Running script InstallBindings...

Traceback (most recent call last):

  File "<string>", line 233, in execute

  File "Z:\Downloads\r-bridge-install-master\rtools\install_package.py", line 240, in install_package

    save_url(download_url, package_path)

  File "Z:\Downloads\r-bridge-install-master\rtools\github_release.py", line 34, in save_url

    if r.headers['content-type'] in valid_types and r.code == 200:

UnboundLocalError: local variable 'r' referenced before assignment

Failed to execute (InstallBindings).

Failed at Tue Sep 11 09:51:12 2018 (Elapsed Time: 19.56 seconds)

~~~ 

If anyone has a solution to this issue please comment. NB: I have also attempted to run the script with only R for mac installed (i.e., no R for Windows), and the tool output says it cannot locate R on my machine. Thx

0 Kudos
1 Solution

Accepted Solutions
ShaunWalbridge
Esri Regular Contributor

Hello Rachel,

Sorry to hear of your problem. I've pushed a new version of the r-bridge-install package which should at least provide an error when it fails to download. Could you try it and see if it resolves the issue? It looks like its failing to connect to GitHub in order to download the package, if after updating it still doesn't work (but does provide an error message), you can manually download the package by visiting:

  Release v1.0.1.232 · R-ArcGIS/r-bridge · GitHub 

From there, you can download the arcgisbinding package as a zip file. Then, place that zip file in the same folder as the R Integration.pyt file, and the installation script should detect it and use it instead.

Cheers,

Shaun

View solution in original post

2 Replies
ShaunWalbridge
Esri Regular Contributor

Hello Rachel,

Sorry to hear of your problem. I've pushed a new version of the r-bridge-install package which should at least provide an error when it fails to download. Could you try it and see if it resolves the issue? It looks like its failing to connect to GitHub in order to download the package, if after updating it still doesn't work (but does provide an error message), you can manually download the package by visiting:

  Release v1.0.1.232 · R-ArcGIS/r-bridge · GitHub 

From there, you can download the arcgisbinding package as a zip file. Then, place that zip file in the same folder as the R Integration.pyt file, and the installation script should detect it and use it instead.

Cheers,

Shaun

RachelField
Emerging Contributor

Hi Shaun,

Thanks so much for your reply and suggestions - it worked! 

Below I have provided details-for-dummies of the solution from my perspective (for future users with this issue):

I re-downloaded the r-bridge installer and got the following error message when trying to 'Install R bindings' in ArcMap desktop:

Executing: InstallBindings true 3.5.1

Start Time: Wed Sep 12 17:03:38 2018

Running script InstallBindings...

Access failed, trying again.

Access failed, trying again.

Access failed, trying again.

Access failed, trying again.

Access failed, trying again.

Unable to access 'https://github.com/R-ArcGIS/r-bridge/releases/download/v1.0.1.232/arcgisbinding_1.0.1.232.zip', invalid content.

Never received valid content

No package found at c:\users\rachel~1\appdata\local\temp\arc49e9\tmpahfzaz\arcgisbinding_1.0.1.232.zip

Completed script InstallBindings...

Failed to execute (InstallBindings).

Failed at Wed Sep 12 17:03:59 2018 (Elapsed Time: 21.14 seconds)

So I did as you suggested (i.e., from the link you provided downloaded 'arcgisbinding_1.0.1.232.zip'; moved to the same folder as 'R Integration.pyt'; re-ran 'Install R bindings' script in ArcMap, and voila. 

Can't thank you enough

0 Kudos