ArcGIS Desktop 9.3.1 ships with Python 2.5.1; however, Python 2.5.4 is also certified and supported. It can be downloaded from the Python Web site (www.python.org). See the link in the Related Information section below.
Python 2.5.4 can be installed on top of Python 2.5.1. That means, it is not necessary to uninstall Python 2.5.1 first.
If Python 2.5.1 is uninstalled, Numerical Python (NumPy) will have to be reinstalled from the ArcGIS installation DVDs for the Spatial Statistics GeoProcessing tools to work.