How is Python IDE aware of ArcPy?

How is Python IDE aware of ArcPy?

I am using PyCharm 4 for some Python scripting.

When I type:

import arcpy

I can immediately start using items within the arcpy namespace, like the environment & workspace objects.

How does the Python IDE, in this case PyCharm, know about ArcPy?

There is a Help page entitled Importing ArcPy that explains this - I encourage you to visit that page which has more detail than I am quoting:

When using an import statement, Python looks for a module matching that name in the following locations (and in the following order):

  1. Paths specified in the PYTHONPATH system environment variable
  2. A set of standard Python folders (the current folder, c:python2xlib, c:python2xLibsite-packages, and so on)
  3. Paths specified inside any .pth file found in 1 and 2

This answer to How to setup PyCharm to reference ArcPy? may also be helpful.

Watch the video: Настройка Python 3 в Eric-Ide.