How To: Clone a Python environment with the Python Command Prompt
ArcGIS Pro provides a user-friendly interface to manage Python environments with the Python Package Manager, a tool that can create, clone, activate and remove Python environments. However in some instances, the Manage Environment dialog box does not allow cloning or creating a new environment.
Alternatively, Python environments can be cloned using the Python Command Prompt by following the steps below:
- Run the Python Command Prompt as an administrator.
- Click the Start icon.
- Navigate to the ArcGIS folder.
- Click Python Command Prompt.
Note: An alternative to run the command prompt as an administrator is to right-click Python Command Prompt > More > Open file location. Right-click Python Command Prompt and click Run as administrator.
- Search for all the available Python environments by entering the following command:
conda env list
- Identify the name of the Python environment to clone. In this example, the environment to be cloned is arcgispro-py3.
- Clone the environment by entering the following command:
conda create --clone <environment to clone> --name <new enviroment name>
Note: For this example, the command is: conda create --clone arcgispro-py3 --name arcgispro-py3_clone
conda create --clone <environment to clone> --name <path><new enviroment name>
Note: For this example, the command is: conda create --clone arcgispro-py3 --name C:\Testing\arcgispro-py3_clone