I am running a similar program from my local computer's terminal and from an AWS EC2.
They both start with:
from arcgis.gis import *
from arcgis.mapping import WebMap
From my local computer, the code continues past the import and runs fine.
From the AWS EC2, I get the following error:
from arcgis.mapping import WebMap
ImportError: cannot import name 'WebMap' from 'arcgis.mapping' (/home/ec2-user/miniconda3/envs/env2/lib/python3.12/site-packages/arcgis/mapping/__init__.py)
I am running an Anaconda terminal locally and miniconda in my EC2.
I used "conda install -c esri arcgis" in both.
Any idea why this is happening and how to fix it?
Thanks