I created a new environment in Conda and installed Python 3.6.9 along with certain modules including ArcPy in that new environment. Please note that I don't use ArcGIS Pro, I only installed the latest ArcPy so that I can use it in a particular Conda environment. I didn't install ArcGIS Pro first, I just installed the latest the latest arcpy version in an Anaconda environment. I use ArcGIS, but I don't use its ArcPy because it's limited to Python 2.7. How can I resolve this issue? Now, when the script in Spyder tries to import arcpy, I get the following error:
File "~\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module> import arcgisscripting ImportError: DLL load failed: The specified procedure could not be found.
Solved! Go to Solution.
Hi KenPrice, have you found the solution to this because i am facing the same problem. Thanks
My current setup uses two major ways of using python. Whenever I need Arcpy I use the arcpy python command prompt for notebooks or VSCode and hit the cloned ESRI arc environment. I add very little to the ESRI environment.
For tasks not needing arcpy/arcgisscripting I use miniconda installed separately and whatever custom stuff I need. This is a work around but has worked well for the past few years.
Basically I stopped trying to have an all-in-one environment because eventually you add stuff that won't work with other stuff and I've found it easier to have a few separate miniconda environments for different major tasks. So just to be clear I have installed miniconda as a standard program on its own and switch which cmd.exe I use as needed.
So the key here is that you have an import error for the DLL. arcgisscripting imports the DLL "_arcgisscripting.pyd".
Even though the interpreter can find the module arcgisscripting, that doesn't seem to be sufficient to find the .pyd file.
I tried adding the path of the .pyd file ('C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgisscripting') to my PYTHONPATH environment variable, restart python, and then it can find the .pyd and now works.