There are three ways to access arcpy.

  1. In ArcGIS Pro via the Python interpreter or Notebooks
  2. In ArcGIS Online Notebooks using Advanced Python 3 kernel
  3. From the command line on Windows by activating the ArcGIS Pro Python environment

Two methods require you to have access to a Windows computer; these instructions are for one of them.

If you want access to arcpy from the command line to run alongside your own code and other third-party Python packages, follow these instructions.

python -c "import arcpy; print(arcpy.__name__)"

References