Lets see your code.
sorry for the late reply.
My code is below:
*************************************
#!/bin/bash
cd `dirname $0`
# ------------------------------------------------- choose a suitable Python
pycheck() {
python=$1
if ! $python -c '' 1>/dev/null 2>/dev/null; then
version=
mysqldb=
return
fi
version=$($python -V 2>&1 | sed -e 's/^Python *//')
mysqldb=$($python -c 'from MySQLdb import connect; print 1' 2>/dev/null)
}
collect() {
candidate=$1
for element in ${array[*]}; do
if [ $candidate == $element ]; then return; fi
done
array=(${array[@]} $candidate)
}
# Gather a list of likely directories for binaries, skipping duplicates.
array=()
for dir in $(echo $PATH | tr : ' '); do
collect $dir
done
collect /bin
collect /usr/bin
collect /usr/local/bin
# Find all the Python binaries in these directories.
pythons=`find ${array[*]} -name "python*" -not -name "pythonw*" 2>/dev/null`
# Check each Python binary for its version and the MySQLdb module.
array=()
adequate=
first=1
for python in $pythons; do
pycheck $python
if [ -z "$version" ]; then continue; fi
present=no
if [ -n "$mysqldb" ]; then present=yes; fi
good=" "
if [[ ! "$version" < 2.3 ]]; then
if [ -z "$adequate" ]; then
adequate=$python
fi
if [ -n "$mysqldb" ]; then
good="*"
collect $python
fi
fi
if [ -n "$first" ]; then
echo "Looking for Python binaries on your PATH:"
echo
echo "Version MySQLdb Binary"
first=
fi
# if [ -L $python ]; then python="$python -> "`readlink $python`; fi
printf " %-6s %3s %s %s\n" $version $present "$good" "$python"
done
echo
# Allow the user to choose a Python binary or accept the first good choice.
echo 'Flamenco requires Python version 2.3 or higher with MySQLdb.'
echo
if [ -n "${array[0]}" ]; then
echo 'In the above list, Python binaries marked with "*" meet both of'
echo 'these criteria. (If you prefer, you can enter the path to any'
echo 'Python binary that is at least version 2.3, and Flamenco setup'
echo 'will attempt to build and install MySQLdb if it is missing.)'
echo
default=${array[0]}
elif [ -n "$adequate" ]; then
echo 'The Python binaries on your PATH are listed above, but none meet'
echo 'both of these criteria. Enter the path to any Python binary that'
echo 'is at least version 2.3. Flamenco setup will attempt to build and'
echo 'install MySQLdb if it is missing.'
echo
default=$adequate
elif [ -z "$first" ]; then
echo 'The Python binaries on your PATH are listed above, but none are'
echo 'version 2.3 or higher. If you have Python 2.3 or higher, enter'
echo 'the path to the Python binary. Flamenco setup will attempt to'
echo 'build and install MySQLdb if it is missing.'
echo
echo 'If you do not have Python version 2.3 or higher, press Ctrl-C to'
echo 'abort Flamenco setup. Download Python from http://python.org/.'
echo
default=
else
echo 'However, no working Python binaries were found on your PATH.'
echo 'If you have Python 2.3 or higher, enter the path to the Python'
echo 'binary. Flamenco setup will attempt to build and install MySQLdb'
echo 'if it is missing.'
echo
echo 'If you do not have Python version 2.3 or higher, press Ctrl-C to'
echo 'abort Flamenco setup. Download Python from http://python.org/.'
echo
default=
fi
........................
**************************************************************
It does not find python binary under /bin or /usr/bin or /usr/local/bin
Where else would python binary (executable) reside ??