If you are using open sourced software i would suggest patching your problematic scripts with a version selector. Kinda:
# Build some *.pyc scripts out of xsd schemas
./generate_all_ds.sh && # Uses xsd files to build the *.py sources to be compiled
python --version 2> python_version.foo &&
PYTHON_VERSION=`cat python_version.foo | sed -e 's/Python //'` &&
rm -fv *.pyc &&
echo Will now execute \'pycompile synthetic_data.py ... tracked.py -V $PYTHON_VERSION -v \&\&\' &&
pycompile synthetic_data.py ... tracked.py -V $PYTHON_VERSION -v &&
sleep .001 && # Sorry cant remember why, wouldnt surprise me not existing reason at all
rm python_version.foo &&
echo 'Compilation batchjob completed successfully'
If this does not show the big picture then just think about how to make programs that behave according to what interpreters does each particular host have.
This is somewhat old software, nowadays i would have done it asking for
mktemp when using foofiles.
God help me now.