I'm having no luck calling arcpy from a script that uses ArcGIS API for Python as well.
I've added every single path I can think of to the PYTHONPATH and path environment variables. No luck. Runs fine with ArcPy and imports arcgis fine as well when run in a Script tool in Pro, or in a Notebook from Pro.
Doesn't run in a Notebook outside of Pro, or called in a bat file where the exe used is here:
\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe
Here's the err (I've also seen no _base.py err):
E:\START\CalFire2020_New\PythonScripts\AGOL_Management>"D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" E:\START\CalFire2020_New\PythonScripts\AGOL_Management\GroupExport.py
Traceback (most recent call last):
File "E:\AGOL_Management\GroupExport.py",
line 12, in <module>
import arcpy
File "D:\Program Files (x86)\ArcGIS\Desktop10.6\arcpy\arcpy\__init__.py", line
22, in <module>
from arcpy.geoprocessing import gp
ImportError: cannot import name 'gp'