Getting ArcPy to work with Anaconda?
--
Welcome to the world of ArcGIS, a powerful geospatial software suite used for mapping, analysis, and visualization of geographic data. To harness the full potential of ArcGIS, it is recommended to set up a Conda environment, which is a virtual environment that allows you to manage and isolate the dependencies required for your ArcGIS projects. In this introduction, we will guide you through the process of setting up a Conda environment to work with both ArcGIS 10.x and ArcGIS Pro, the two main versions of ArcGIS currently in use.
Set up Anaconda with ArcGIS 10.x
· Install Anaconda without fouling the Windows environment.
· Configure Anaconda with the particular add-ons you want, and
· Configure ArcGIS’s Python so that it is aware of the appropriate Anaconda content.
1) Install Anaconda for All Users
1. Go to https://www.anaconda.com/products/distribution
2. Download the 32-bit version of Anaconda (Python 2.7): Anaconda2–2019.10-Windows-x86.exe
3. In the install dialogs:
· Select install for All Users
· Install to a folder by default (C:\Users\trant\AppData\Local\Continuum\anaconda2)
· IMPORTANT: To avoid breaking ArcGIS (or other software), uncheck the checkboxes (a) make Anaconda the default Python and (b) add Anaconda’s Python to the PATH.
4. Go to Start > All Programs(apps) > Anaconda2(32-bit) > Anaconda Prompt. Right click, run as administrator
2) Configure an Anaconda environment for use with ArcGIS
1. Find the versions of numpy and matplotlib ArcGIS is using.
Open ArcMap and its Python window, and enter these commands:
· >>> import sys, numpy, matplotlib