PyScripter is an easy IDE to install for ArcGIS Pro development. If you are using ArcGIS Pro version 2.2 or newer, you will first have to create and activate a clone of the ArcGIS default Python environment (see here for details on this issue). To do this, click on "Manage Environments" just above "Installed Packages", choose "Clone Default", and wait around 10 minutes or so, while ArcGIS is creating the clone (in version 2.7 you should see a list of packages being installed which will tell you that the clone is being created). If the cloning fails with an error message saying that a Python package couldn't be installed, you may need to run ArcPro as an Administrator (do a right-click -> Run as administrator on the ArcGIS Pro icon) and repeat the steps above (it's also helpful to mouseover that error box in Pro and see if it gives you any additional details).
When the cloning is done, the new environment "arcgispro-py3-clone" (or whatever you choose to call it - but we'll be assuming it's called the default name) can be activated by clicking on the button on the left. Do so and also note down the path where the cloned environment has been installed, appearing below the name. It should be something like C:\Users\<username>\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone. Then click the OK button. You often need to restart Pro to get this change to take effect, and you may see a message telling you to restart.
Now perform the following steps to install PyScripter:
- Download the installer from PyScripter's soureceforge download page. here
- Follow the steps to install it, Checking the additional shortcuts if you want those features. Create a desktop shortcut does what it says it does. A Quick Launch shortcut is placed in the Task Bar, and the Add 'Edit' with PyScripter' to File Explorer context menu adds the option to use PyScripter in the menu that appears when you right click on a file.
- Click the Install button and follow the prompts. Check the Launch PyScripter and click Finish.
- Once PyScripter opens, we need to point it to the cloned environment we made. To do this, find the Python 3.x (64-bit) on the bottom bar . Your Python might mbe different, and that is ok for now. Click on the Python and it will open a window listing all of the Python environments it found. If your clone is not listed, you need to click on the gear with the plus and navigate to where it was created. You can get this path by referring to the Package Manage in Pro. Once you get to the parent folder of the environment, select it and it will add it to the list of Unregistered Versions.
- Double click on the environment to activate it. If you get an Abort Error, click ok to close the prompt.
- Verify that your environment is active. It will have a large arrow next to it. Close the Python Versions window.
- It is a good idea to close the application and restart it to ensure that it saves your activated environment. If the settings revert back to the defaults, repeat the step 4 through 7 again and it should save.
If you are familiar with another IDE you're welcome to use it instead of PyScripter (just verify that it is using Python 3!) but we recommend that you still install PyScripter to be able to work through the following sections and the sections on debugging in Lesson 2.