ArcGIS Pro Python Cloning Gone Awry - Learn from my pain

I recently ran into a problem where VS Code stopped working with my ArcGIS Pro cloned Python environment. VS Code would say the environment was invalid. ArcGIS Pro told me my clone had a version mismatch. Thus began several days of troubleshooting [Spoiler alert: I did eventually figure out what went wrong but I felt the story should still be shared.]

First steps:

  • Click Upgrade next to the clone in ArcGIS Pro Package Manager. Conda pack fails.
  • Try creating a new clone. Conda pack fails.
  • Extreme measures taken. Clean uninstall/reinstall ArcGIS Pro 3.7.3 [hint, spoilers…]. Conda pack still fails to create a new clone.
  • Run the Python Command Prompt as administrator and try some alternative commands to conda proclone. New environment created! But then ArcGIS Pro calls it invalid with the same version mismatch error.
  • Talk to Esri support. Run through all of the above again, no dice.

Time to get creative:

  • Spin up a new Windows 11 virtual machine and install ArcGIS Pro 3.7.3. Conda pack still fails to clone the environment. So, it’s not my laptop, good to know.
  • Roll back the VM to ArcGIS Pro 3.7.0, before installing the patch. New clone succeeds! VS Code liked it too!
  • Installed the 3.7.3 patch. New clone still works!
  • Support eventually identified this as a known bug. BUG-000186595

What must have happened is that I was on 3.6.x and then upgraded to 3.7.3 without stopping to upgrade the clone at 3.7.0. Hopefully this helps someone out there before the bug is fixed at 3.8.0.

Happy Mapping!

2 Likes