Select to view content in your preferred language

Has anyone encountered issue with importing arcgis or arcpy?

167
3
Friday
VHolubec
Esri Regular Contributor

Hello,

after installation to 3.5 (I´ve tried the uninstall/install procedure twice), I have a trouble with importing "arcgis" module in default Pro env - in every client - Pro/Notebook/VSCode with error:

" File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\cryptography\x509\certificate_transparency.py", line 11, in <module>
from cryptography.hazmat.bindings._rust import x509 as rust_x509
ImportError: DLL load failed while importing _rust: Access denied.
"

also I tried the clonned env + its update, but it´s even worse.

For "import arcpy" I am getting error:

"UnboundLocalError: cannot access local variable 'etree' where it is not associated with a value"

and for "import arcgis":

"ImportError: DLL load failed while importing etree: The procedure hasn´t been found."

Hasn´t expected that behavior, but so far it seems it´s not a general behavior, just I am just curious if you encountered the same behavior and if so whether you solved it? 

Or is there a way how to "reset" the Python env?

Thank you.

Vladimir
0 Kudos
3 Replies
TonyAlmeida
MVP Regular Contributor

Have tried doing a ArcGIS Pro repair, py3 re-install, reset the default Python environment?

 

DanPatterson
MVP Esteemed Contributor

for local installations this  works

How To: Perform a Clean Uninstall and Reinstall of ArcGIS Pro

a soft reset probably isnt worth it


... sort of retired...
VHolubec
Esri Regular Contributor

Thank you @TonyAlmeida , @DanPatterson  for tips.

@TonyAlmeida  - I tried to reinstall the Pro (classic way without sweeping out all the settings). I thought this could make a clean installation of the default python env.

@DanPatterson  I was thinking about the clean un(installation), but tried to avoid it at first, for example in favor or reset of the python env only.

Anyway, it looks to be the only way 😞

Thanks both!

Vladimir
0 Kudos