I am trying to work with the reticulate and arcgisbinding packages in R (version 4.2.3), but am receiving the following error message when I try to import arcpy:
I'm not sure what the problem is, since numpy is already listed as installed in the ArcGIS Pro package manager. Please let me know how I can fix this issue. Thanks!
Solved! Go to Solution.
One option that appears to work is to first import reticulate and arcpy, and then import arcgisbinding:
library(reticulate)
use_python("C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3")
arcpy <- import("arcpy")
library(arcgisbinding)
arc.check_product()
This solves it. However, if I load any other libraries before running the first three lines, I get the following error: "Error: ImportError: DLL load failed while importing _arcgisscripting: The specified procedure could not be found."
related?
Solved: Re: Arcgisbinding package install error in R - Esri Community
Hey! 👋🏼
This looks like a python issue and I too am not sure what's going on! The error looks related to this specific library: https://github.com/IntelPython/mkl-service
First I would remove the calls to arcgisbinding since that isnt necessary to connect to arpy. arcpy is a python library and using reticulate is a wya to call python from R.
Instead of `use_python()` can you use `use_conda()` and see if that changes anything?
One option that appears to work is to first import reticulate and arcpy, and then import arcgisbinding:
library(reticulate)
use_python("C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3")
arcpy <- import("arcpy")
library(arcgisbinding)
arc.check_product()
This solves it. However, if I load any other libraries before running the first three lines, I get the following error: "Error: ImportError: DLL load failed while importing _arcgisscripting: The specified procedure could not be found."