HOW TO

Generate a duplicate conda environment with similar packages installed after an ArcGIS Pro update

Last Published: July 15, 2021

Summary

In some instances, a cloned conda Python environment is rendered invalid and is inaccessible after an ArcGIS Pro update. This article outlines the steps to perform to generate a new environment with the same package installed in the previous conda environment.

Procedure

Follow the steps below to create a new cloned version of conda up to date with the default environment, and reinstall the desired Python library.

  1. Run Python Command Prompt as an administrator.
    1. Click the Start icon.
    2. Navigate to the ArcGIS folder.
    3. Right-click Python Command Prompt > More > Open file location.
    4. Right-click Python Command Prompt and click Run as administrator.
  2. Activate the environment to be cloned using the following command:
conda activate <environment_name>
  1. Generate a list of packages installed in the current environment with the following command:
conda env export
  1. Generate a list of additional dependencies of installed packages with the following pip command:
pip freeze
  1. Delete the previous environment.
conda env remove <environment_name>
  1. Clone the default environment. Refer to How To: Clone a Python environment with the Python Command Prompt for the instructions to make a clone from the default environment in Python Command Prompt
  2. Update the newly created environment with the following command:
conda env update --n <name> --f env.yml
  1. ​​​​​​Install the required pip packages by using the following command:
pip install <package name>
  1. Set the newly created environment as the new active environment in the Python Command Prompt. 
proswap <new environment_name>
  1. Perform the required ArcGIS Pro update by referring to ArcGIS Pro: Update ArcGIS Pro.

Article ID: 000024206

Software:
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options