I recently created two environment variables in my terminal as shown below
export SPARK_HOME=\'/opt/spark/\' export HAIL_HOME=\'/home/ABCD/.pyenv/versions/3.7.2/e
I realized that it doesn't produce output for HAIL_HOME because it is installed in my virtual environment. (see .pyenv which is a hidden folder for my virtual environment`)
HAIL_HOME
virtual environment
.pyenv
However, if anyone can confirm this it's even better
use os.environ.get("SPARK_HOME").