Managing ArcGIS applications

There are multiple ways in which you can experience the ArcGIS API for Python and its SDK. The ArcGIS API for Python is distributed as a conda package named arcgis. Conda is a popular Python package and environment manager application that helps you install and update packages such as the ArcGIS API for Python and their dependencies.

The API is now available in a live sandbox. You may choose to experience it in the sandbox before going ahead with the installation. Click the link below to launch a temporary Jupyter notebook environment.

Anaconda installs Python, conda for package management and many useful Python packages. Since the ArcGIS API for Python requires Python 3.5 or later, proceed to the Anaconda download page and download the appropriate 3x version of the Anaconda software:

You may have to click the 'refresh' button to ensure you get the complete list of available releases. You will be able to install up to release 1.2.5. To upgrade to a package beyond the 1.2.5 release, see Upgrade the arcgis package

Pipenv is the official packaging tool for managing environments and installing packages from the Python Package Index (PyPI). To install the ArcGIS API for Python from PyPI in a new environment, create a new folder named your-folder. Open a terminal, and run cd /path/to/your-folder to change directories into your-folder. Then, enter the following command to simultaneously create a new environment and install the API in it:

pipenv install arcgis

After running this command, you will notice that a new file named Pipfile was created in your-folder. A Pipfile contains package information that represents a python environment. Open your terminal and make sure you are still in the your-folder directory; then, run pipenv shell. You have now activated your python environment, the environment that contains the arcgis package! You can run jupyter notebook or python in this environment to start using the API.

Pipenv differs from conda and other environment managers in that environments are specific to the folder that contains the Pipfile. In this way, pipenv's use of Pipfile is similar to how npm uses package.json. To learn more about installing and using pipenv, click here or here.

Tip: You can run any command in an environment without activating it by running pipenv run {insert_command_here} in a directory with a valid Pipfile.

Pip is the predecessor of pipenv, and can also be used to install packages from PyPI (but you must manage environments with seperate tools like virtualenv). To install the API with pip, open a terminal and enter the following command:

You should avoid mixing conda with pipenv/pip: they are completely seperate package managers. It is recommended that you use conda to install the API if you are a beginner user. Read more about the differences here and here.

Note: when installing the ArcGIS API for Python with pipenv/pip, some dependencies may require Microsoft Visual C++ 14.0. If you see any errors related to this, either install the Microsoft Visual C++ tools or install the API without dependencies.

Both conda install -c esri arcgis and pip install arcgis will install all of the dependencies outlined in the system requirements section. However, the API can function in a 'stripped down' state with only the six dependency. This means you can manually manage the dependencies on your system if you don't want to use every feature of the API.

To install the API with no dependencies, simply add the --no-deps flag to any install command, i.e. conda install -c esri arcgis --no-deps or pip install arcgis --no-deps. You can then manually choose which dependencies, if any, to add to your Python environment.

ArcGIS Pro 2.2 ships with the ArcGIS API for Python 1.4.1 installed. The initial ArcGIS Pro installation creates a default read-only conda environment named arcgispro-py3. To upgrade the ArcGIS API for Python package, use the Python Package Manager to create a new environment and then install the latest release of the ArcGIS API for Python:

ArcGIS Pro 2.1 ships with the ArcGIS API for Python 1.2.5 installed. To update to the newest release, proceed to to run the command below from either a Terminal window with the arcgispro-py3 environment active, or the Python Command Prompt:

Docker is a popular containerization technology. Docker containers bundle software in a complete file system with everything that is needed to run it. Docker containers run the same regardless of your operating system. To learn more about docker, refer to the official documentation.

The ArcGIS API for Python is shipped as a Docker image which you can download and power up whenever you want to use the API. These images when spun up into containers, run in an isolated environment without making any changes to your local file system.

Follow the steps below to get Docker on your computer and run the API: