import arcpy
Does not work in 3.6 python. I really need to get it to work or it's new version. Very new to Python.
It's odd, when I look at installed programs, it says I have 3.6 python. Running Python in a command window says it's 3.6.
However, when I open IDLE, it says it's using Python 2.7.8.
Bit out of my element. I'm a VB/JScript programmer.
Thanks
I only re-installed arcmap and then it works.
Try typing the following...
import arcpy.mp
Python 3.x has changed the naming somewhat.
Although arcpy.mapping became arcpy.mp with ArcGIS Pro/Python 3; the base package name is still arcpy, so if someone can't import arcpy they won't be able to import arcpy.mp.
Hi Doug,
Python 2.7 is installed with ArcMap and Python 3.x is installed with ArcGIS Pro, because arcpy is proprietary you can't download it into a free standing installations of python you have to point to one of the deployments that is installed when installing ArcGIS for Desktop.
so just point your IDE to one of these deployments
ArcMap
"C:\Python27\ArcGIS10.8\python.exe"
ArcGIS Pro
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"
You can have a look at the ArcGIS API which is a available for installation e.g. pip install ArcGIS to see if this might fill your need.
ArcGIS API for Python | ArcGIS for Developers
If you are using ArcGIS Desktop built in Python interpreter then just reinstall to try and fix the issue like @Anonymous User mentioned.