Hello. I created a python script which uses the ArcGIS API for Python. I created a new conda env for the script because i also use several non-esri libraries. The conda environment was cloned from a ArcGIS Pro 2.8 install. Our IT staff recently updated all our machines to ArcGIS 2.9. Now my script no longer runs. I get the following error message indicating an ArcGIS Pro version mismatch:
I activated the conda env before trying to execute my script, but there still seems to be a dependency on the pro-py3 environment.
Do i need to clone\create a new conda env based on the new version of ArcGIS Pro installed? I thought the advantage of using conda was to create independent environments that don't have these types of version dependencies.
Is there something that i'm not doing quite right here?
did you try updating the environment?
Don't know about 2.9, but in 3.x
Upgrade an environment—ArcGIS Pro | Documentation
check your version of the help topic
Nope - not yet anyway. I'll do that right away. Thank you for the link.
Maybe i'm quibbling here (plus don't fully understand conda environments), but isnt the purpose of a conda environments to remove dependencies on other 'environments'? Anyway, i'll try the update approach and let you know how it goes.
Turns out that updating the environment with a magic desktop command is not possible in 2.9, and the
command doesn't exist yet. Any other ideas i can try other than just rebuilding the environment from scratch?
I was afraid of that, so you are probably already done cloning arcgispro-py3 and adding your packages already, but for future reference, you can create one using a *.yml file
Managing environments — conda 23.3.0.post6+9929f60ed documentation
clones are still pinned so you will have to deal with that in 2.9 onward
Thank you for sharing your knowledge with me. I really appreciate it.
Yah, it turned out to be more efficient to recreate the conda environment. Strangely, i had documented the process pretty well the last time, so it wasn't so painful. who knew documentation could be so helpful 😉
It becomes more important with age... as well as changing technology 😀