if ! [[ -f ${DOWNLOAD_DIR}/Python-${PYTHON_3_VERSION}.tgz ]]; then wget -P ${DOWNLOAD_DIR} https://www.python.org/ftp/python/${PYTHON_3_VERSION}/Python-${PYTHON_3_VERSION}.tgz || exit fi
if ! [[ -f ${DOWNLOAD_DIR}/Python-${PYTHON_2_VERSION}.tgz ]]; then wget -P ${DOWNLOAD_DIR} https://www.python.org/ftp/python/${PYTHON_2_VERSION}/Python-${PYTHON_2_VERSION}.tgz || exit fi
tar -zxvf ${DOWNLOAD_DIR}/Python-${PYTHON_3_VERSION}.tgz -C ${DOWNLOAD_DIR} tar -zxvf ${DOWNLOAD_DIR}/Python-${PYTHON_2_VERSION}.tgz -C ${DOWNLOAD_DIR}
# ************ install python 2 ************ cd${DOWNLOAD_DIR}/Python-${PYTHON_2_VERSION} || return # if need, you can uncomment the following code # make clean ./configure --prefix=${PYTHON_2_HOME} --enable-optimizations make sudo make install
sleep 10s
# ************ install python 3 ************ cd${DOWNLOAD_DIR}/Python-${PYTHON_3_VERSION} || return # if need, you can uncomment the following code # make clean ./configure --prefix=${PYTHON_3_HOME} --enable-optimizations make sudo make install