Hi,
I'm trying to add an image service to a map. I'm following documentation (https://developers.arcgis.com/python/latest/guide/using-imagery-layers/) that says to use the arcgis.layers module, but I get the following error: ModuleNotFoundError: No module named 'arcgis.layers'
I'm using ArcGIS Pro 3.2, I cloned and updated the active environment...still not found. Any suggestions would be appreciated.
Thanks.
Yes, @CodyPatterson that's what is causing the error I'm receiving. Sorry, I should have made that more clear...
arcgis 2.4 requires python >3.10 <3.13
doesn't Pro 3.2 use 3.9?
give this a try
import arcgis
arcgis.__version__
'2.4.0'
from arcgis import layers
dir(layers)
['BasemapService',
'BasemapServices',
'BuildingLayer',
'CSVLayer',
'EnterpriseMapImageLayerManager',
'EnterpriseSceneLayerManager',
'EnterpriseVectorTileLayerManager',
.... snip ...
maybe the clone installed a different versin and "layers" is now a separate module
Thanks @DanPatterson. That still didn't work. If it's retired, is there a new (or different) way of adding an image web service?
its npt retired ... I am
so you are aren't using Pro 3.4 and python 3.11 and the cloning of the environment wouldn't have installed the correct version of the arcgis module, and even if you did install it, you will have to check that is the correct version in the clone