|Table of Contents|
What is the Anaconda distribution?
Anaconda is an open-source Python distribution that makes is possible to easily install and manage many pre-packaged third party Python modules. It is a competing fully open-source alternative to the Enthought Python Distribution (EPD).
- Very useful tools and modules not in Esri's standard distribution are available (iPython, pandas, etc).
- You can install and update the Python stack as a regular (non-pr) user
- You can install and remove, and update third party packages easily, with Anaconda checking for compatibility for you
- A single Python install stack can be used to set up different "virtual environments"
The general workflow to make this happen is to:
- Install Anaconda without fouling the Windows environment (paths, registry) to break Esri's python stack
- 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 (Single-User - no admin access needed)
- Go to http://continuum.io/downloads
- Download the 32-bit (x86) version of Anaconda (ArcMap [32-bit] can only directly work with 32-bit Python)
- In the install dialogs:
- Select install for a single user (Not "All Users")
- Install to a folder where there is going to be plenty of space (recommend the D drive, not the C drive)
- IMPORTANT: To avoid breaking ArcGIS, uncheck the checkboxes (a) make Anaconda the default Python and (b) add Anaconda's Python to the PATH.
- Here are screenshots to help guide you through the install process.
At this point, you will have full Anaconda version of the python environment that's spiffy and new and totally useless with ArcMap.
2) Configure Anaconda To Work with ArcGIS
The following workflow will demonstrate how set up a custom Python environment within Anaconda that is similar to that of ArcGIS Python, and then add a compatible version pandas module. Pandas is great for a whole variety of data processing tasks (just google "python pandas"). If you get this far, you can adapt this workflow to include any other modules you may want.
3) Configure ArcGIS to see Anaconda and vice versa
This can easily be done with a Python startup script
- Install Anaconda, setup environment to match your ArcGIS version
- Edit the paths in this script (usercustomize.py.txt) to match your setup
- Put the script in the Python user site packages folder (must be named usercustomize.py)
The user site-packages folder path can be found with:
python -m site --user-site
This is usually:
Testing and Troubleshooting
- Start ArcMap, open the Python window
- type "import pandas"
- type "pandas."
- A popup menu with a list of pandas-provided functions is a pretty good sign the install succeeded.
- Get to the Anaconda Command Prompt (via the Start menu on Windows, e.g.)
- Type "conda install -n arc1022 pandas=0.10.0"