install error with R 4.0

4293
7
Jump to solution
06-04-2020 02:25 PM
PeteDowty
New Contributor

I'm just getting started with an R-ArcGIS Bridge tutorial.

I'm running ArcGIS Pro 2.5.1 on Windows running as Parallels virtual machine on MacOS.

I first installed the bridge from Pro (Project-Options-Geoprocessing) with R 3.6 installed on my system.  I then upgraded R to 4.0.  

When I try to run in R just two lines:

     library(arcgisbinding)

     arc.check_product()

I get the following error in the R console:

"Error: package or namespace load failed for 'arcgisbinding':

  package 'arcgisbinding' was installed before R 4.0.0: Please reinstall it."

I then run "remove.packages("arcgisbinding") from the R console.  This appears to successfully remove the package because in R if I try to load it (with library(arcgisbinding)) I get "there is no package called 'arcgisbinding'". In Pro on the Project tab Options-Geoprocessing page, the pulldown menu has changed back to "Please install the ArcGIS R integration package".

I then re-install from Pro with R 4.0 home directory selected and using the "install package from the internet" from the pull down menu. I am asked for confirmation (New arcgisbinding version 1.0.1.239 is available. Would you like to install it?) and the output from the install is "package 'arcgisbinding' successfully unpacked and MD5 sums checked. Completed".

In Pro, the pull down on the Options-Geoprocessing page is changed to "Check package for updates" so I assume ArcGIS Pro had a successful install.

In R, the "library(arcgisbinding)" statement gives me the same error at top (package installed before R4.0: Please reinstall it".

I haven't seen anything mentioning incompatibility with R 4.0.  I see two possible options:  go back to R 3.6 and try that, or uninstall R and ArcGIS Pro and start over.

Anyone else have this experience, or any suggestions?

thank you

pd

0 Kudos
1 Solution

Accepted Solutions
ShaunWalbridge
Esri Regular Contributor

Our historical way of building and upgrading the package no longer works, since we can only support one version of the product at a time with a single download from GitHub. We're in the process of switching to having an R channel which can be accessed to install the package, and will allow us to maintain multiple versions for the different versions of R (and 32-bit versus 64-bit). This will be available automatically in Pro 2.6, for now with Pro 2.5 you can install it by opening R or RStudio, and running:

install.packages("arcgisbinding", repos="http://r-arcgis.github.io/r-bridge", type="win.binary")

That should install the latest version of the bridge and is compatible with R 4.0.

Cheers, Shaun

View solution in original post

7 Replies
ShaunWalbridge
Esri Regular Contributor

Our historical way of building and upgrading the package no longer works, since we can only support one version of the product at a time with a single download from GitHub. We're in the process of switching to having an R channel which can be accessed to install the package, and will allow us to maintain multiple versions for the different versions of R (and 32-bit versus 64-bit). This will be available automatically in Pro 2.6, for now with Pro 2.5 you can install it by opening R or RStudio, and running:

install.packages("arcgisbinding", repos="http://r-arcgis.github.io/r-bridge", type="win.binary")

That should install the latest version of the bridge and is compatible with R 4.0.

Cheers, Shaun

PeteDowty
New Contributor

Thank you Shaun.  That did the trick.  Pete

MichaelRodriguez
New Contributor

I'm now running R 4.1   The arcgisbinding library installs successfully with the following code. 
The previously posted solution seems to be expired.  This line (below) is in the github repository seems to work.

install.packages("arcgisbinding", repos="https://r.esri.com", type="win.binary")   

VratikaChaudhary
New Contributor

Hi, Thanks for a really good package and regular updates. I updated R to 4.2 and the way of installing by running install.packages("arcgisbinding", repos="https://r.esri.com", type="win.binary")  no longer works. I was able to use R 4.1 for my work. But it will be nice to have an update for future. Thanks!

ShaunWalbridge
Esri Regular Contributor

Hello Vratika,

R 4.2 no longer provides a 32-bit version of the software, and only ships a 64-bit version. Because of this, R 4.2 and later won't work with ArcMap except through background geoprocessing. ArcGIS Pro is a 64-bit application and will work without additional steps for R 4.2, or as you did continue using R 4.1 which still provides a 32-bit version in the installation.

Cheers, Shaun

JamalNUMAN
Legendary Contributor

R – ArcGIS: How to download, install, and configure R- ArcGIS?

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
ShaunWalbridge
Esri Regular Contributor

If you have an Esri desktop product like ArcMap or ArcGIS Pro installed already, once you install R you can run the command:

 install.packages("arcgisbinding", repos="https://r.esri.com", type="win.binary")

From an R session to install the arcgisbinding package. If you have ArcGIS Pro, you can also visit Options > Geoprocessing and configure the bridge through the support provided here.