- Published on
How to Set Up PyCharm for Use With ArcGIS Pro
This article teaches you how to set up PyCharm for use with ArcGIS Pro, ArcPy and ArcGIS API for Python.
Table of Contents
Installation
If you don't have PyCharm yet, download and install it. The Community Edition will do perfectly for GIS scripting. When installing, you can accept the default settings.
Fresh setup after installation
When PyCharm is opened after installation, a Welcome to PyCharm window is displayed.
- Click on Configureat the bottom and thenSettings:
- A Settings for New Projectswill appear. ClickProject Interpreterfrom the list at the left.
- Ignore the drop-down list for 'Project Interpreter', click the cog button and then Add:
- In the new popup window, select System Interpreterand click the Browse (...) button. Navigate to C:\Program Files\ArcGIS \Pro \bin \Python \envs \arcgispro-py3and select python.exe:
If you cannot find a python.exe file at this location, your Python installation may be located at C:\UsersProject (Settings) menu under Python tab:
- Click OKin the 'Add Python Interpreter' window and in the 'Settings for New Projects' window. It will take a while for your interpreter to update but after that you'll be set for Python scripting.
Setup for a new project
If you already have PyCharm, use the following instructions to set up an ArcGIS Pro Python project.
- Select File->Settings...to open theSettingswindow.
- Click on your project name from the list at the left and select Project Interpreter.
- Ignore the drop-down list for 'Project Interpreter', click the cog button and then Add:
- In the new popup window, select System Interpreterand click the Browse (...) button. Navigate to C:\Program Files\ArcGIS \Pro \bin \Python \envs \arcgispro-py3and select python.exe:
If you cannot find a python.exe file at this location, your Python installation may be located at C:\UsersProject (Settings) menu under Python tab:
- Click OKin the 'Add Python Interpreter' window and in the 'Settings' window. It will take a while for your interpreter to update but after that you'll be ready with the setup.
Seeing PyCharm in action
With the Python interpreter properly configured, PyCharm becomes a powerful tool for GIS scripting. It provides code completion, documentation for all the available tools, quick-fixes and much more: