HOW TO

Klonen einer Python-Umgebung mit der Python-Eingabeaufforderung

Last Published: November 8, 2023

Zusammenfassung

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 does not allow cloning or creating a new environment.

As a workaround, Python environments can be cloned using the Python Command Prompt. Use the instructions provided in this article.

Vorgehensweise

  1. Run the 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. Search for all the available Python environments by entering the following command:
conda env list
The Python Command Prompt with the list command highlighted.
  1. Identify the name of the Python environment to clone. In this example, the environment to be cloned is arcgispro-py3.
The Python Command Prompt with the environment highlighted.
  1. Clone the environment by entering the following command:
conda create --clone <environment to clone>  --name <new environment name>
Note:
For this example, the command is: conda create --clone arcgispro-py3 --name arcgispro-py3_clone
The Python Command Prompt with the clone command highlighted

Alternatively, to clone the environment to a specific directory path, enter the command as:

conda create --clone <environment to clone>  -p <path><new environment name>
Note:
For this example, the command is: conda create --clone arcgispro-py3 -p C:\ProgramFiles\ArcGIS\Pro\bin\Python\envs\arcgispro-py3_clone3
The command code to clone the environment in the C:\ProgramFiles\ArcGIS\Pro\bin\Python\envs\ folder

Artikel-ID: 000020560

Benachrichtigungen erhalten und Lösungen für neue oder häufige Probleme finden

Unser neuer KI-Chatbot stellt zusammengefasste Antworten und Videolösungen für Sie bereit.

Esri Support App herunterladen

Zugehörige Informationen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln