Python Checks

python --version
python2 --version
Python 3.9.12
Python 2.7.18

Conda Checks

echo Conda Check
# test for a kernel installation
test="jupyter" # keyword
check=`conda list | grep $test` # run command
n=${#check} # determine length

if [[ ${n} > 0 ]];  # testt length
then # greater than zero
    echo "$check"
else # less than zero
    echo "$test not found"
fi
Conda Check
jupyter                   1.0.0            py39h06a4308_7  
jupyter_client            6.1.12             pyhd3eb1b0_0  
jupyter_console           6.4.0              pyhd3eb1b0_0  
jupyter_core              4.9.2            py39h06a4308_0  
jupyter_server            1.13.5             pyhd3eb1b0_0  
jupyterlab                3.3.2              pyhd3eb1b0_0  
jupyterlab_pygments       0.1.2                      py_0  
jupyterlab_server         2.10.3             pyhd3eb1b0_1  
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1  

Jupyter Checks

jupyter --version
jupyter kernelspec list
Selected Jupyter core packages...
IPython          : 8.2.0
ipykernel        : 6.9.1
ipywidgets       : 7.6.5
jupyter_client   : 6.1.12
jupyter_core     : 4.9.2
jupyter_server   : 1.13.5
jupyterlab       : 3.3.2
nbclient         : 0.5.13
nbconvert        : 6.4.4
nbformat         : 5.3.0
notebook         : 6.4.8
qtconsole        : 5.3.0
traitlets        : 5.1.1
Available kernels:
  bash          /home/nmounier/.local/share/jupyter/kernels/bash
  java          /home/nmounier/.local/share/jupyter/kernels/java
  javascript    /home/nmounier/.local/share/jupyter/kernels/javascript
  python3       /home/nmounier/anaconda3/share/jupyter/kernels/python3

Kernel Checks

test="python3" # keyword
check=`jupyter kernelspec list | grep $test` # run command
n=${#check} # determine length

if [[ ${n} > 0 ]];  # testt length
then # greater than zero
    echo "$check"
else # less than zero
    echo "$test not found"
fi
  python3       /home/nmounier/anaconda3/share/jupyter/kernels/python3