Pro 2.8.0 update giving me problems-- all seem Python-related

06-02-2021 09:29 AM
Labels (1)
MVP Regular Contributor

I updated yesterday and there are a few things not working. 1) I can't open a Notebook from Pro. It will crash Pro. 2) I can't open a Jupyter Notebook at all. 3) From a Pro python environment in VS Code 2019 my modules are all broke in the few scripts I have open. 4) Even opening the python window from the View menu will crash Pro.

The Pro environment is using Python 3.7.10. The python .exe file still lives in the same directory: C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3

Based off another question ("Adding notebook crashing ArcGIS"),  I went to my Python Package Manager and noticed I have a lot of duplicate packages as the author of the question did. Why's this happening? And what's the solution to getting my Pro python environment back up?

0 Kudos
3 Replies
MVP Esteemed Contributor

As a matter of course, when I am going from 2.x to 2.x+1 I use the opportunity to cleanup.  

I uninstall the 2.x version, rename my old installation folder by adding "old" to the folder name, then I rename the esri folder in the C:\Users\\AppData\Local by adding "old" to it..

I then install the 2.x+1 version from the *.msi and my python IDE and any other packages that I need (I install in the base environment, some people clone).  I test and if everything is good, I delete the *old folders.

Works for me every time and I found it takes less time than trying to cleanup after an "upgrade".

I have done this even during the "beta" phase of every version of Pro that I have been involved in.


... sort of retired...
MVP Esteemed Contributor

Fixed? or are there still issues?

... sort of retired...
0 Kudos
MVP Regular Contributor

Thanks for the workflow. I had a post going in the Python Documents community too. I followed this workflow to get my environment up and running again.

  1. Navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3, back it up somewhere else, ex: %localappdata%\temp\arcgispro-py3-broken-backup
  2. Uninstall Pro 2.8
  3. Navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 and make sure the folder is deleted. If it isn't, go ahead and delete it.
  4. Install Pro 2.8
  5. In the python command prompt:

    • create a new environment by cloning arcgispro-py3, and activate it:
      • >>>conda create --clone arcgispro-py3 --name my-env --pinned
      • >>>activate my-env
    • Generate a list of additional packages installed in your current environment, with the conda command:
      • >>>conda env export > env.yaml
    • (Optional) If you have additional dependencies installed through pip,
      find those with pip freeze:
      • >>>pip freeze > requirements.txt
    • Add back missing conda packages from your current environment:
      • >>>conda env update -n my-env -f env.yaml
    • (Optional) Add back missing packages from pip:
      • >>>pip install -r requirements.txt
    • (Optional) Make it the default for the ArcGIS Pro application:
      • >>>proswap my-env
0 Kudos