I am having trouble with how I am supposed to use both ArcPy and ArcGIS API for Python. ArcPy is only in Python 2 and ArcGIS API for Python is in ArcGIS Pro and is Python 3. I don't know how to set my paths in VS Code or Atom to be able to use both.
You can only run a Python script against one version of the Python debugger at a time (2.7, 3.4, etc).
If you have ArcMap, which runs against Python 2.x and the Python API (I'd assume you've installed Python 3.x and required dependencies), then you can't write a single script that calls
import arcpy import argis
In theory you might be able to write a script that sub-processes out to Python 3.x from the 2.7 one. As was pointed out in the comments, the ArcGIS Python API only runs against Python 3.x
Alternatively (actually, hopefully this is your case as this is easiest), if you're using ArcGIS Pro, which lays down Python 3.x and is handled via Conda, you can write one script that calls both
arcgis. Assuming you've loaded the Python API into the ArcGIS Pro (Conda managed) Python. In this case, you can call Python directly from
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" However you should read this help topic as it goes into more detail about running Python.