Select to view content in your preferred language

Problem with mkl-service / NumPy installation

1259
4
Jump to solution
04-25-2023 10:52 AM
Labels (3)
NicholasMarantz
New Contributor

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:

Screenshot 2023-04-25 105056.png

 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!

0 Kudos
2 Solutions

Accepted Solutions
MarthaBass
Esri Contributor

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()

 

View solution in original post

0 Kudos
NicholasMarantz
New Contributor

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."

View solution in original post

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor
0 Kudos
JosiahParry
New Contributor II

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?

0 Kudos
MarthaBass
Esri Contributor

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()

 

0 Kudos
NicholasMarantz
New Contributor

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."

0 Kudos