I have two versions of python installed on my Linux box 2.6 and 2.7, as indicated in the link I have installed python 2.7 in /usr/local/bin/ and have created alias and updated PATH variable. The 2.6 is installed in /usr/bin/.
After this when I check the python version it displays 2.7.3 on terminal but on the same terminal when I run a bash script (that need to detect the python version) it displays as 2.6.
How should I enforce the bash script to refer to alias or /usr/local/bin for picking the right python version.
/usr/bin/pythonwhich has to be a symbolic link. Update that link to point to 2.7 directory and it should be all set. - ring bearervirtualenv- hek2mgl# Validate the python installed if [[ $(python --version 2>&1) != *2\.7* ]]; then echo -e "$COL_RED Qt compile requires Python 2.7 $COL_RESET"; exit 1 else echo "Detected Python version 2.7" fi- Panch