%%bash
#Check version of Conda 
conda_version=$(conda -V 2>&1 | sed -n ';s/.*conda \(.*\)/\1/p;')
#conda_version=$(conda -V 2>&1 | sed -n ';s/.*conda "\(.*\)\.\(.*\)\..*".*/\1\2/p;')
#conda_version='conda -V | sed -n ';s/conda "\(.*\)\.\(.*\)\..*".*/\1\2/p;'
#echo $conda_version
#Check version of Python
 python_version=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'`
#Print using conditional statement
 if [ $conda_version > "0" ]; then
   echo "Conda version: "$conda_version
 else
   echo "Conda not installed"  
 fi
if [ $python_version > "0" ]; then
   echo "Python version: "$python_version
 else
   echo "Python not installed"  
 fi
Conda version: 4.14.0
Python version: 3.9.12