Description
In current versions of PySpark, the worker Python processes inherit the master's PYTHONPATH environment variable. This can lead to ImportErrors when running the PySpark worker processes if the master and workers use different SPARK_HOME paths. Instead, the workers should append SPARK_HOME/python/pyspark to their own PYTHONPATHs.
To support customization of the PYTHONPATH on the workers (e.g. to add a NFS folder containing shared libraries), users would still be able to set a custom PYTHONPATH in spark-env.sh.