I'm getting the following error when I try and import GIS from arcgis.gis on ArcGIS Pro 3.5.1. Has anyone else come across this issue?
from arcgis.gis import GIS
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\__init__.py", line 3, in <module>
from arcgis.auth.tools import LazyLoader
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\auth\__init__.py", line 1, in <module>
from .api import EsriSession
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\auth\api.py", line 11, in <module>
from ._auth import (
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\auth\_auth\__init__.py", line 2, in <module>
from ._pki import EsriPKIAuth
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\auth\_auth\_pki.py", line 6, in <module>
from ..tools import parse_url, assemble_url
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\auth\tools\__init__.py", line 3, in <module>
from ._adapter import EsriTrustStoreAdapter
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\arcgis\auth\tools\_adapter.py", line 10, in <module>
from cryptography import x509
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\cryptography\x509\__init__.py", line 7, in <module>
from cryptography.x509 import certificate_transparency, verification
File "C:\Tools\arcgispro-py3-user-env\Lib\site-packages\cryptography\x509\certificate_transparency.py", line 8, in <module>
Where are you running this from? (python notebook within Pro, jupyter notebook etc etc)
version of the api?
if it can't be resolved simply, then raise an Issue on
Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python
since they tend to not to follow Community as much
Sorry for the lack of info. It's via a python script I put together so I'm guessing Pro?
It is working in arcgis 2.3.0 bundled with ArcGIS Pro 3.3.1 but not in arcgis 2.4.1 bundled with ArcGIS Pro 3.5.1
Open a python window within arcgis Pro then and enter
from arcgis.gis import GIS
if it doesn't raise an error, then the arcgis module is working fine using the arcgispro-py3 environment.
You might want to preface the above with a basic import
import arcgis
and see if that works if the aforementioned doesn't
if it doesn't, then you have installation issues.
Running a "python script" doesn't guarantee anything, you need to know if you are using the base arcgispro-py3 environment or a clone or a separate conda environment.
Pro can handle scripts/commands when they are run from within their python window, arctoolbox tools or their jupyter notebook environment, anything else needs to be tested.