Interpretation of Scripts files in Conda environment in ArcGIS Pro

introduce

The files included in Scripts are as follows

1. propy.bat

Used to run Python scripts (files with a .py extension) outside ArcGIS Pro. The conda environment used is synchronized with the ArcGIS pro environment. The principle of propy.bat is to replace python.exe in the respective python environment. The main difference is that propy.bat uses the same environment as Pro.

The steps to perform are as follows:

  • Activate the ArcGIS Pro conda environment
  • Start Python
  • Run specified script
  • Exit Python and the environment

2. proenv.bat

Start the ArcGIS Pro Python 3 conda environment/Activate the ArcGIS Pro environment and open a command prompt window

3.proswap.bat

Activate the conda environment, which means replacing the current conda environment with the new conda environment. Function similar to original conda named active.

Example: In section 2. of this article, we know that the current conda environment is condatest1. We use the proswap.bat file to replace the conda environment with arcgispro-py3. The results are as follows

Guess you like

Origin blog.csdn.net/qq_39397927/article/details/135238750