Python Report.tbx - Report Python environment

File uploaded by curtvprice Champion on May 21, 2016Last modified by curtvprice Champion on May 23, 2016
Version 4Show Document
  • View in full screen mode

This toolbox contains a single model that prints diagnostics of the current Python environment. If your Python tool run from Desktop is not doing what you want it to, this tool may help you diagnose the issue.

 

In the example below, the tool is run from ArcMap.

 

Python environment

 

sys.prefix: C:\Python27\ArcGIS10.2

sys.executable: c:\program files\arcgis\desktop10.2\bin\RuntimeLocalServer.exe

Python run cmd: "C:\Python27\ArcGIS10.2x64\python.exe" "%1" %*

sys.path:

  c:\program files\arcgis\desktop10.2\bin

  c:\program files\arcgis\desktop10.2\Archie

  c:\program files\arcgis\desktop10.2\ArcPy

  c:\program files\arcgis\desktop10.2\ArcToolbox\Scripts

  C:\WINDOWS\system32\python27.zip

  C:\Python27\ArcGIS10.2\Lib

  C:\Python27\ArcGIS10.2\DLLs

  C:\Python27\ArcGIS10.2\Lib\lib-tk

  C:\Python27\ArcGIS10.2

  C:\Python27\ArcGIS10.2\lib\site-packages

 

UPDATE: Dan Patterson inspired me to modify the tool to always run in foreground (in Desktop), and add a second tool that will run in background (if enabled).

(This tool should run fine in Pro and Server, too, where everything "runs in background.")

Attachments

Outcomes