R-ArcGIS / r-bridge-install

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

Error: 'Failed to initialize R interpreter' in ArcGIS Pro GP script #105

Open jg-esri opened 3 years ago

jg-esri commented 3 years ago

Hi there! I'm having an issue I'm hoping one of you smart people might have an answer to.

I've installed the R-ArcGIS Bridge bindings and can use them without issue in a jupyter notebook session in a conda environment, but trying to run R code in a geoprocessing script tool using either the conda install or the R-Studio default install always throws the following error:

image

The backstage has the following options set:

image

The R installation details script completes and shows the following messages:

'R (version 4.1.1), installed in: C:\Program Files\R\R-4.1.1 R packages will be installed into: C:\Users\\Documents\R\win-library\4.1 All R package libraries detected: C:\Users\\Documents\R\win-library\4.1;C:\Program Files\R\R-4.1.1\library The ArcGIS R package (version 1.0.1.244) is installed at: C:\Users\\Documents\R\win-library\4.1\arcgisbinding'

I haven't been able to find a way to get the interpreter initialized correctly, does anyone have any ideas to try?

Thanks much!

scdub commented 2 years ago

The error that is displayed looks like it is coming from a setting of the PATH command. Could you see if your conda environment is configured as the default R interpreter for Pro and share the output of %LOCALAPPDATA%\ESRI\RIntegration.conf? That text file contains the version of R Pro will try to interact with.