Install ArcPy

The ArcPy package is part of the default Python distribution arcgispro-py3 that is provided with ArcGIS Pro and ArcGIS Server.

Customization of the arcgispro-py3 Python environment through the addition of Python packages or other modifications is discouraged. To customize your Python environment, create a Python environment, then activate and customize your new environment. This is recommended because the customization of an environment can make it unusable in some cases. If the arcgispro-py3 environment is in a bad state, functionality in the ArcGIS Pro application (which uses the arcgispro-py3 environment) can also be in a bad state. A full uninstallation and reinstallation of ArcGIS Pro may be required.

Create an environment with ArcPy by cloning arcgispro-py3. An environment can be cloned using the Python Package Manager in ArcGIS Pro, or the conda command line application from the Python Command Prompt.

Beginning with ArcGIS Pro 2.7, you can add ArcPy to an existing Python 3 environment, as long as its package versions are not in conflict. To add ArcPy, use conda to install ArcPy from the Esri channel on Anaconda Cloud. From the Python Command Prompt, run the following command with the appropriate release number:

conda install arcpy=2.8 -c esri

関連トピック