Hi actually to be sure that you are putting the right SPARK_HOME PATH you can use this python script to locate it : https://github.com/apache/spark/blob/master/python/pyspark/find_spark_home.py
python3 find_spark_home.py /usr/local/lib/python3.7/site-packages/pyspark
On my Mac, on the terminal :
vim ~/.bashrc
and add the path :
export JAVA_HOME=/Library/java/JavaVirtualMachines/adoptopenjdk-8.jdk/contents/Home/export SPARK_HOME=/usr/local/lib/python3.7/site-packages/pysparkexport PYSPARK_PYTHON=/usr/local/bin/python3
and then finally to apply the change
source ~/.bashrc