0

I created a new environment in Conda and installed Python 3.6.9 along with certain modules including ArcPy in that new environment. 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.

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 use ArcGIS, but I don't use its ArcPy because it's limited to Python 2.7. How can I resolve this issue?

4
  • 2
    arcgisscripting dates back to the infancy on Python support in ArcGIS. Trying to use it with Python 3 is like looking for the buggy whip holder in a Tesla. – Vince Sep 30 '20 at 18:00
  • So even though the latest arcpy module supports Python 3.6.9, it's still buggy? – Arthur_Morgan Sep 30 '20 at 18:03
  • 2
    The arcgisscripting environment is effectively deprecated. I doubt any effort has been made to improve it in the eight releases since it was superseded. The new ribbon framework made significant changes to ArcPy; I would certainly hope that arcgisscripting was pruned from the source tree, but I fear that it will remain, just like VBA support in Calculate Field. Note that "I don't use ArcGIS Pro" is incompatible with "I don't use its ArcPy because it's limited to Python 2.7" -- the only ArcPy available for Python 3 is the ArcGIS Pro flavor. – Vince Sep 30 '20 at 18:49
  • 1
    Vince, I think you're assuming the OP is import arcgisscripting based on the error. The error they've shown is normal: behind the scenes arcpy does import arcgisscripting. arcpy is basically a wrapper to arcgisscripting. Besides that point, there isn't any reason why someone couldn't import arcgisscripting. It's there for backwards capability. The error the OP is running into is either a licensing, or more likely, a configuration issue as they talk about setting up their own environment. – KHibma Sep 30 '20 at 18:51
4

If you are using the ArcMap application rather than the ArcGIS Pro application of the ArcGIS Desktop product then I believe you will need to use the ArcPy that installs with ArcMap and that requires you to use Python 2.x.

2
  • So I can't use arcpy that comes with ArcGIS Pro in Anaconda, if I have ArcGIS installed as well? Please note, that I didn't install ArcGIS Pro first, I just installed the latest the latest arcpy version in an Anaconda environment. – Arthur_Morgan Sep 30 '20 at 16:25
  • 1
    I’ll stop short of saying that it’s impossible, but if it is, then I don’t know how. – PolyGeo Sep 30 '20 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.