ArcGIS Pro

The All New Package & Environment Manager for ArcGIS Pro

ArcGIS Pro has included a visual package and environment manager based on the popular Conda manager since 2.3. A major goal for 3.0 was making the maintenance of packages and environments easier and more robust, and to address many of the issues that have been brought to our attention by you, our users. To this end, we have completely overhauled the package and environment manager user interface.

The new Package Manager user interface
The new Package Manager user interface.

Managing your Python environment is a foundational part of working with Python in ArcGIS Pro. Think of conda environments as different contexts within which Python and R execute. Each environment can contain a distinct set of packages that extend Python or R. The default environment for ArcGIS Pro is named arcgispro-py3 and contains ArcPy, the ArcGIS API for Python, and all the supporting packages required to run Python-based functionality in ArcGIS Pro. You can create different environments with diverse package sets to serve various purposes. For example, you might create another environment with additional packages for data science, and a third for database updates. Each environment co-exists on your machine, isolated from the others, and can be activated when needed. With this update, we have changed the Python project setting tab’s name to Package Manager to better reflect its use.

The package manager update brings some major usability and performance improvements, and adds several useful new features to the experience of managing your environments and packages in ArcGIS Pro. Let’s take a closer look.

Responsiveness

The user interface (UI) is generally more responsive. For example, when accessing the Package Manager from Project Settings, you are now immediately presented with the new manager UI without having to wait for a lengthy refresh to complete. Refreshing is no longer necessary but may still be needed occasionally to update the Conda package cache. You can find the Refresh button Refresh button on the Environment Manager dialog, and refresh will run as a dedicated task in the background, leaving you free to continue working.

Refreshing the package cache
The refresh button is now located on the Environment Manager dialog box, and the refresh action runs in the background.

Tasks Queue

The UI now provides more and better feedback. You can find a new tasks queue at the bottom right of the Package Manager. When you clone, install a package, or refresh, a conda operation is executed. All Conda operations (eg: clone, install package, and refresh) are now added to the tasks queue and will run in the background, leaving you free to continue working.

Hovering over a task will display a floating window containing all messages from the current task, so that you can monitor what conda is doing. While the task is being performed, messages will appear in the window in real time. Completed tasks will remain in the tasks queue until you close ArcGIS Pro, allowing you to see a history of the current session’s tasks.

Tasks queue
Several Queued Tasks.

Search

Previously, the search box to find new packages was only available on the Add Packages tab. With ArcGIS Pro 3.0, you can also search the Installed and Updates tabs. In addition, packages can now be searched by name or by a keyword, making it easier to locate the package you are looking for.

Search packages
Search for installed packages that have "date" in their name or description.

Environment Activation

The name of the active environment is now displayed at the top right of the Package Manager next to the Environment Manager button Manage. In addition to clicking the Environment Manager button to activate an environment from the Environment Manager dialog box, you can now also use the pull-down to quickly activate an environment.

Activating an environment
Activate an environment by using the active environment drop-down menu. Note that the drop-down menu will only contain one environment if you do not have additional environments available.

Initialized Environments

At certain times you may notice a yellow warning banner across the top of the Package Manager. This is part of our effort to better communicate the state of an environment. There are two banners you may see: a warning that the default arcgispro-py3 environment is active (and therefore packages cannot be modified), or a warning that a restart is required. The warnings are not new, but they are now featured more prominently.

At ArcGIS Pro 3.0 a Python Interpreter icon Python Interpreter may appear next to an environment name in the Package Manager dialog box. This icon complements the “restart required” warning and is intended to make this requirement more transparent.

In short, the Python Interpreter icon is displayed next to an environment’s name if the interpreter has been initialized for it. What does that mean? It means that the interpreter is now running from that environment. Because Python is integrated into the framework of ArcGIS Pro, the Python interpreter is locked to this environment until ArcGIS Pro is closed, thus requiring a restart to use a different environment.

The interpreter is initialized whenever it is first needed for notebooks, the Python window, certain geoprocessing tools, or other areas of the software. Other environments can still be activated and modified even after the interpreter has been initialized on an environment, but ArcGIS Pro will continue to use the initialized interpreter until the application is restarted.

You can easily identify an initialized environment by checking for the Python Interpreter icon. When an environment other than the initialized environment is activated, the yellow warning banner will remind you to restart ArcGIS Pro to use that environment.

Interpreter is initialized
The interpreter is initialized on the arcgispro-py3-custom environment, but currently arcgispro-py3-geo is the active environment. The warning banner indicates that to use the interpreter of arcgispro-py3-geo, ArcGIS Pro must first be restarted.

To summarize, you can think of environments in ArcGIS Pro as having inactive, active, or initialized states. Inactive and active states are mutually exclusive—an environment is either active or inactive. However, after the interpreter is initialized on an active environment, the interpreter will remain initialized on the environment for the remainder of the session, independent of whether it is currently active or inactive.

Environment Upgrade

The custom environment you created in a previous release of ArcGIS Pro will not work in the current release of ArcGIS Pro. With each release of ArcGIS Pro, the packages in the default Conda environment arcgispro-py3 are upgraded to include the latest stable versions of Python and packages that are compatible with the release. This is done to ensure that we ship with the latest features, bug fixes, and security patches. For those taking full advantage of the power of environments, however, this can be a pain point. Why? Because a Conda environment created in one version of ArcGIS Pro will have a set of packages that is incompatible with another version. As a result, the environment will not work after upgrading ArcGIS Pro.

The good news is that in ArcGIS Pro 3.0, we’ve added functionality to address this problem! When the Environment Manager detects an environment which was created for a different version of Pro, an Upgrade button Upgrade will appear on the environment. Clicking the button will update the environment to become compatible with the current release of ArcGIS Pro.

Upgrade an environment
After an environment with a version mismatch is detected, the upgrade button becomes available.

You can monitor the upgrade progress by viewing the task’s messages. Don’t worry—if anything goes wrong with the upgrade, the original environment is backed up as a tar.bz2 file and can be restored.

Environment Repair

The Environment Manager will detect some cases where the environment is broken and cannot be used as is. In such cases, you will find a Repair button Repair available on the environment in the Environment Manager. Click the Repair button for conda to attempt to repair the environment.

Repair an environment
The new repair button available on broken environments.

Rename Environments

In previous releases, if you wanted to rename an environment from the UI, you were out of luck. Now, you can easily rename environments from the Environment Manager dialog box by selecting the Rename option Rename after either right-clicking on the name or using the More options menu ••• on the environment.

Remove an external environment
A remove button has appeared on the external environment esri-spark. Note that the environment has a green arrow icon next to its name, indicating it is external.

Remove External Environments

External environments that you have added to ArcGIS Pro can now be removed from the environments list on the Environment Manager (as opposed to deleted outright). External environments are defined as any environment that is not located in the default cloned environment directory for ArcGIS Pro, %localappdata%\ESRI\conda\envs. If the environment is outside of this directory, it will have an External icon External environment next to the name and can be removed from the Environment Manager list using the Remove button Remove.

Remove an external environment
A remove button has appeared on the external environment esri-spark. Note that the environment has a green arrow icon next to its name, indicating it is external.

Conda Settings Information

The current version of conda is displayed in the top left of the Environment dialog box with an info icon Information that, when you hover over it, reveals additional details.

View Conda details
Details about Conda can now be found on the environment manager.

Conclusion

We on the Python team at Esri hope that you enjoy the overhauled package manager and the new features. While we expect continued development, this release marks a major milestone in the maturity of the package and environment manager offered in ArcGIS Pro.

Below is a small set of known issues at ArcGIS Pro 3.0. We will be working towards addressing these issues in upcoming releases.

Thank you for your continued feedback!

About the author

Hannes is a product engineer on the Python team. He has five years of experience streamlining spatial data analysis workflows in the public and private sectors, and has been with Esri since 2019, where he focuses on the design, evaluation, and documentation of new and existing Python functionality.

0 Comments
Inline Feedbacks
View all comments

Next Article

8 ways to style point clusters on the web

Read this article