Fix python setup in diagnostic_analysis