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.
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.
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 on the Environment Manager dialog, and refresh will run as a dedicated task in the background, leaving you free to continue working.
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.
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.
The name of the active environment is now displayed at the top right of the Package Manager next to the Environment Manager button . 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.
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 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.
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.
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 will appear on the environment. Clicking the button will update the environment to become compatible with the current release of ArcGIS Pro.
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.
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 available on the environment in the Environment Manager. Click the Repair button for conda to attempt to repair the environment.
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 after either right-clicking on the name or using the More options menu ••• on the environment.
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 next to the name and can be removed from the Environment Manager list using the Remove button .
Conda Settings Information
The current version of conda is displayed in the top left of the Environment dialog box with an info icon that, when you hover over it, reveals additional details.
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.
- Minor icon, text, and placement tweaks in UI elements.
- Cannot name an environment outside of the default %programfiles%\ArcGIS\Pro\bin\Python\envs location arcgispro-py3, and any existing environment by this name cannot be upgraded.
- Show a warning instead of succeeded status on Upgrade tasks when warnings are raised while upgrading environments.
- Refreshing the environment list when it becomes out of sync (rare situation when multiple instances of Pro or the Command Line are used at the same time to manage environments).
- Crash when deleting an environment after the interpreter has become initialized for it, but it is not currently the active environment.
- Error when switching clones too quickly on the drop-down menu.
Thank you for your continued feedback!