A script is being developed for use in ArcGIS Pro. Currently, the script is being edited in an IDE but run from within ArcGIS Pro. The downside of this approach is that it is harder to debug errors. For example, adding print statements to the script does not pass these statements to the geoprocessing history when running the script.
It is desired to instead run the script in the IDE directly. In order to do so, the same environment used within ArcGIS Pro must be used by the IDE.
Is there any way to export the python environment from ArcGIS Pro to a generic format (such as a .yml)?
1 Answer 1
You need to configure your IDE to use the same Python environment as ArcGIS Pro. This is a common task when working in a Windows environment. Here are some instructions for setting environmental variables in an IDE to work with PyCharm and ArcGIS Pro.
I like using WingPro but the setup is the same. Here is a screenshot of my Python Environment settings in WingPro. enter image description here
arcpy.AddMessage()
in place ofprint()
if you want to see messages in the geoprocessing framework.