How to assign the python interpreter spark worker used?
i try several method like: 1) set env Vars
export PYSPARK_DRIVER_PYTHON=/python_path/bin/python
export PYSPARK_PYTHON=/python_path/bin/python
not work. i'm sure PYSPARK_DRIVER_PYTHON PYSPARK_PYTHON env set success use:
env | grep PYSPARK_PYTHON
i want to pyspark use
/python_path/bin/python
as the starting python interpreter
but worker start use the :
python -m deamon
i don't want to link default python to /python_path/bin/python in the fact that this may affect other devs, bcz default python and /python_path/bin/python is not same version, and both in production use.
Also set spark-env.sh not works:
spark.pyspark.driver.python=/python_path/bin/python spark.pyspark.python=/python_path/bin/python
when start driver some warning logs like:
conf/spark-env.sh: line 63: spark.pyspark.driver.python=/python_path/bin/python: No such file or directory conf/spark-env.sh: line 64: spark.pyspark.python=/python_path/bin/python: No such file or directory
spark.pyspark.driver.pythonandspark.pyspark.pythonshould be set inspark-defaults.conf. The equivalent inspark-env.shisexport PYSPARK_DRIVER_PYTHON=/python_path/bin/python,export PYSPARK_PYTHON=/python_path/bin/python. Check both files to make sure these options don't get overwritten. - MaFF