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.

...

  1. Install Anaconda, setup environment to match your ArcGIS version
  2. Download and edit the installation paths in this script (usercustomize.py.txt) to match your setup
  3. IMPORTANT - Debug this script by running it from python.exe exe:
    C:\Users\cprice\Anaconda32\ 
  4. Place the script in the Python user site packages folder (with the name usercustomize.py)
    The user site-packages folder path can be found with:  python -m site --user-site
    Usually it is:  C:\Users\username\AppData\Roaming\Python\Python27\site-packages

...

  1. Start ArcMap, open the Python window
  2. import pandasIf you don't get an error message, you are probably good to go.

 

  1. Start Anaconda command prompt, activate your ArcGIS environment
  2. import arcpy

If you get an error message when you try to import, a common cause is version incompatibilities between  Esri's python environment modules and the conda modules. (Condo takes care of compatibility across its environment, but it can't know about versions Esri uses in their python install.) In the pandas example, version 0.10.1 also appears to use the same 1.6.1 version of numpy used by ArcGIS 10.1.x, but some errors occur when trying to import pandas due to some other incompatibility. The solution was to modify the Anaconda environment to use an older version of pandas (0.10.0):. The other critical packages are included to avoid having Anaconda install some other incompatible packages.

  1. Open Anaconda Command Prompt (via the Start menu on Windows, e.g.)
  2. conda install -n arc101 arc101 python=2.7.5 matplotlib=1.3.0 numpy=1.6.1 pandas=0.10.0

References

http://www.continuum.io/blog/conda

...