Running ArcPy on ArcGIS for Windows

GIS How-To for Running ArcPy on ArcGIS for Windows

There are multiple Python environments are available on AWS Marketplace Windows Server image for ArcGIS. Portal, Pro, and Server in the screenshot below have Python.


ArcGIS Directory

Step-by-step guide

If you activated ArcGIS Pro, you need to use the python under Pro/ directory to avoid license error.

  1. cd bin/Python/envs/arcgispro-py3/
  2. Run .\python <your_script>


ArcGIS Pro Arcpy Directory
Information Icon

Here's the typical error that you will encounter when the wrong Python was used.

File "c:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgisscripting\", line 119, in <module>
    from ._arcgisscripting import *
RuntimeError: The software is not authorized for use.
Last Updated