I came across the same error message and I have tried three ways mentioned above. I listed the results as a complementary reference to others.
PYTHON_SPARK
and PYTHON_DRIVER_SPARK
value in spark-env.sh
does not work for me.os.environ["PYSPARK_PYTHON"]="/usr/bin/python3.5"
os.environ["PYSPARK_DRIVER_PYTHON"]="/usr/bin/python3.5"
does not work for me.~/.bashrc
works like a charm~