Confluence Retirement

In an effort to consolidate USGS hosted Wikis, myUSGS’ Confluence service is scheduled for retirement on January 27th, 2023. The official USGS Wiki and collaboration space is now SharePoint. Please migrate existing spaces and content to the SharePoint platform and remove it from Confluence at your earliest convenience. If you need any additional information or have any concerns about this change, please contact myusgs@usgs.gov. Thank you for your prompt attention to this matter.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fix typo

...

Code Block
languagetext
titleWindows Command Prompt
mkdir %USERPROFILE%\.certificates
copy %USERPROFILE%\Downloads\/DOIRootCA2.cer %USERPROFILE%\.certificates
conda config --set ssl_verify %USERPROFILE%\.certificates\DOIRootCA2.cer

...

  1. Open the Anaconda prompt (32 or 64, depending on the ArcGIS environment you are integrating with)
  2. Create a compatible environment
    1. 32-bit 2.7 (ArcMap, ArcCatalog)
      ArcGIS 10.2.2:  conda create -n arc1022 python=2.7.5 numpy=1.7.1 matplotlib=1.3.0 pyparsing xlrd xlwt console_shortcut
      ArcGIS 10.3.1:  conda create -n arc1031 python=2.7.8 numpy=1.7.1 matplotlib=1.3.0 pyparsing xlrd xlwt console_shortcut
      ArcGIS 10.4.1: conda create -n arc1041 python=2.7.10 numpy=1.9.2 matplotlib=1.4.3 scipy=0.16.0 pandas pyparsing xlrd xlwt  console_shortcut *NOTE* Esri shipped 0.15.0, but I needed to use 0.16.0 to have conda work
      ArcGIS 10.5: conda create -n arc105 python=2.7.12 numpy=1.9.2 matplotlib=1.4.3  scipy=0.17.0 pandas pyparsing xlrd xlwt console_shortcut
      ArcGIS 10.5.1: conda create -n arc1051 python=2.7.13 numpy=1.9.3 matplotlib=1.5.2  scipy=0.17.0 pandas pyparsing xlrd xlwt console_shortcut64-bit (Background Geoprocessing (x64), ArcGIS Pro
      ArcGIS 10.x x64 background processing: same as above, from Anaconda 64-bit prompt, for example:
          .6.1: conda create -n arc105x64 arc1061 python=2.7.12 14 numpy=1.9.2 3 matplotlib=1.45. scipy=0.17.0 pandas pyparsing xlrd xlwt console_shortcut
    2. ArcGIS Pro 1.2: 64-bit 2.7 ArcGIS Desktop Background Geoprocessing
      Same as above for each version, from Anaconda 64-bit prompt, for example:
          conda create -n arcpro12 arc105x64 python=32.47.3 12 numpy=1.9.3 2 matplotlib=1.4.3 scipy scipy=0.1617.0 pandas pandas pyparsing xlrd xlwt  xlwt console_shortcut
    3. 64-bit Python 3 ArcGIS Pro (from Anaconda 64 bit prompt).
      ArcGIS Pro 1.32: conda  conda create -n arcpro12 python=3.4.3 numpy=1.9.3 matplotlib=1.4.3 scipy=0.16.0 pandas pyparsing xlrd xlwt console_shortcut
      ArcGIS Pro 1.3: conda create -n arcpro13 python=3.4.4 numpy=1.10 matplotlib=1.4.3 scipy=0.16.1 pandas pyparsing xlrd xlwt console_shortcut
      ArcGIS Pro 2.0: conda create -n arcpro20 python=3.5.2 numpy=1.11.2 matplotlib=1.5.3 scipy=0.18.1 pandas pyparsing xlrd xlwt console_shortcut
    The conda tool will:
    1. ArcGIS Pro 2.2.1: conda create -n arcpro22 python=3.6.5 numpy=1.14.2 matplotlib=2.2.2 scipy=1.0.1 pandas pyparsing xlrd xlwt console_shortcut
  3. The conda tool will:
    • Determine that the specified package versions are compatible with each other.
    • Find any packages on which these depend and determine most recent versions that are compatible with what you've asked for, if not completely specified.
    • Show you what it plans to do and prompts you to continue.
    • Download (only) the packages you need to "overlay" onto the base environment to get the environment you have specified.
    • Set up a environment subdirectory, (D:\Users\jwpowell\Miniconda2\envs\arc1041 in our example) installing the downloaded packages into it. This adds up to about 1.5 GB in our ArcGIS 10.4.1 example.
    • The console_shortcut conda package will adds a shortcut to your Windows start menu that directly starts up your environment. (Note, if you remove the environment, you will have to delete it yourself.)
    • Windows 10 note: 

      Windows 10 won’t show a start menu item if the name of an item/shortcut within the new group matches a shortcut name in another group and has the same target  (e.g. both ‘Anaconda2 (32-bit)’ and ‘Anaconda2 (64-bit)’ have a shortcut named ‘Anaconda Prompt’ with a target of cmd.exe which confuses Windows 10). So, when Miniconda2 32-bit (and/or 64-bit) is installed edit the ‘Properties’ of ‘Anaconda Prompt’ -> General tab -> rename to ‘Anaconda Prompt 32-bit’. Also, rename each shortcut that is created for environments for 32-bit or 64-bit similarly for consistency. For example, if you created a new virtual environment in Anaconda 32-bit named arc1041 then you would rename the shortcut from ‘Anaconda Prompt (arc1041)’ to ‘Anaconda Prompt 32-bit (arc1041).

...

Many thanks to Parker Norton for his reviews and excellent additions to this document!

Other approaches

Justin Mayers has posted a batch script to install and set up set up MiniConda and environments to interact compatibly with Esri desktop software (ArcMap and Pro).

USGS BWTST supports an Anaconda3 SCCM package. This could be installed and linked to Pro using the information in this document.

ArcGIS Pro 2.x and later sets up an Anaconda install of its own. This environment could also be leveraged in various ways as time goes on.