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.

  1. Click on Configure at the bottom and then Settings:
Welcome to PyCharm window
  1. A Settings for New Projects will appear. Click Project Interpreter from the list at the left.
  2. Ignore the drop-down list for 'Project Interpreter', click the cog button and then Add:
Python project interpreter selection
  1. In the new popup window, select System Interpreter and click the Browse (...) button. Navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3and select python.exe:
Python system interpreter selection

If you cannot find a python.exe file at this location, your Python installation may be located at C:\Users\YOUR_USER_NAME\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3. You can also find your Python path in ArcGIS Pro from the Project (Settings) menu under Python tab:

Python path location
  1. Click OK in 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.

  1. Select File -> Settings... to open the Settings window.
  2. Click on your project name from the list at the left and select Project Interpreter.
  3. Ignore the drop-down list for 'Project Interpreter', click the cog button and then Add:
Python project interpreter selection
  1. In the new popup window, select System Interpreter and click the Browse (...) button. Navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3and select python.exe:
Python system interpreter selection

If you cannot find a python.exe file at this location, your Python installation may be located at C:\Users\YOUR_USER_NAME\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3. You can also find your Python path in ArcGIS Pro from the Project (Settings) menu under Python tab:

Python path location
  1. Click OK in 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:

Importing ArcGIS Python modules
Documentation for ArcGIS tools