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.
- Run Python Command Prompt as an administrator.
- Click the Start icon.
- Navigate to the ArcGIS folder.
- Right-click Python Command Prompt > More > Open file location.
- Right-click Python Command Prompt and click Run as administrator.
- Activate the environment to be cloned using the following command:
conda activate <environment_name>
- Generate a list of packages installed in the current environment with the following command:
conda env export
- Generate a list of additional dependencies of installed packages with the following pip command:
pip freeze
- Delete the previous environment.
conda env remove <environment_name>
- 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.
- Update the newly created environment with the following command:
conda env update --n <name> --f env.yml
- Install the required pip packages by using the following command:
pip install <package name>
- Set the newly created environment as the new active environment in the Python Command Prompt.
proswap <new environment_name>
- Perform the required ArcGIS Pro update by referring to ArcGIS Pro: Update ArcGIS Pro.