C lone or not to clone
NOTE: I will be updating with a new guide for ArcGIS Pro 2.4 when it is released (Beta 2 is now complete.
I will provide the link here.
- If you want to install a package or upgrade an existing package.
- You should be able to update or install packages distributed by esri within the existing environment... but you can't. I know it is confusing, but it may mean that the distributed packages haven't been fully tested (ie packaged for AI or machine learning)
- If you aren't the guardian of your machine... you need to clone.
- You are in the Star Wars clone category.
Why Not Clone?
- You are the master of your machine and are familiar with software installation and 'conda' stuff. If this is you, then you can install packages base ArcGIS Pro environment because you will have full admin rights.
- Keep the *.exe download and/or the *.msi and *.cab files if you 'toast' something and need to do a reinstall. This need hasn't happened with any of my cohort.
- I completely uninstalled previous versions of Arc-Anything-and-Everything.
- Alternately, good time to buy a really good upgraded machine
- Do a fresh new install of ArcGIS Pro.
- Don't let the installation software decide where it wants to install. Make a folder ahead of time (ie arc_pro or similar and install there... C:\Program Files.... is a really long path with spaces and I hate installing anything there that doesn't need to
- Make a clone as describe below the dashed ===== line if you aren't in control of your machine
Result.... I couldn't install any packages through Pro's package manager, and when I installed Spyder via conda in my clone, it couldn't import arcpy
- I installed spyder via conda into the arcgispro-py3 env and now I have spyder working.
- I also installed other packages into that environment without issue.
- When you download, use save as to download the *.exe to a folder ... you want to keep this.
- Run the *.exe you downloaded so you have the installer *.msi and *.cab files
- Double-click on the *.msi file to begin the installation
- Specify the folder where you want Pro to be installed
- Run 'conda' via proenv.bat ( the python command prompt) and make sure your arcgispro-py3 is active and install away
- Alternately, create your clone and try to get it working with your packages and arcpy
So far I have made upgrades to
- python 3.6.8 the last of the 3.6 line
- numpy 1.16.2 the last of the 1.15 line
- I upgraded other packages as well
Testing without installing
You can check the affect of package updates without actually installing them. I still recommend using this first, then check the list for possible conflicts issues. Launch conda, then ...
conda install <your package name> --dry-run
This is the dashed line... below is for cloning... the package installation is the same for both
Clone... If you have to do it, here is a guide. This guide is only for people which have actual control over their computers.
The Clone Guide
You can launch proenv.bat via your windows start options under the guise of the Python Command Prompt.
I prefer to make a desktop shortcut as shown below.
Your environments can be controlled within ArcGIS Pro's package manager or via 'conda' accessed through proenv.bat.
Cloning from within Pro
It is slower and you don't get a lot of information, but they are improving it as they go along. Activate the environment, close Pro, then restart with the new environment.
Working with conda
The shortcut brings up the command prompt in you active environment. To obtain information on your environments, just run conda info --envs
You can add a package from within the package manager of via conda. Since I prefer the --dry-run option in conda, I will illustrate it here. You can leave out the --dry-run option to perform the actual install once you are sure you won't cause any foreseen issues.
You can upgrade a package either from the package manager in ArcGIS Pro or via conda. The package manager seems to take longer and you don't get much feedback during the process.
Again, I prefer to examine an upgrade using the --dry-run option first, prior to committing.
You don't need this section
Ok... love that blue? Making conda package installs more fun...
Now not everyone needs this nor can everyone do this, but with a patch on a single file, you can add an alternate package manager and access to a load of documentation links.
In order to get the above, you have to edit a few lines in the 'conda_api.py' which will located in your clone path
The patch given by
entails altering a couple of lines in the conda-api.py file. I made a copy of the original and made fixes to the other in case I needed to undo the changes quickly. Not ideal, but worth it if you need to provided documentation and application shortcuts to users with diverse computing backgrounds.
Like I said... you don't need it, but it is a definite 'nice'.