0

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)?

asked Mar 21 at 8:11
2
  • 4
    You can configure VS Code to use the Arcgis Pro environment, and use it to execute and debug your code Commented Mar 21 at 8:27
  • 4
    Use arcpy.AddMessage() in place of print() if you want to see messages in the geoprocessing framework. Commented Mar 21 at 9:51

1 Answer 1

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

answered Mar 21 at 15:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.