spark2.0 shell默认使用的是python2,如果想用python3作为默认shell,那么只需要修改{spark_home}/bin/pyspark文件下的配置即可。
# Determine the Python executable to use for the executors:
if [[ -z "$PYSPARK_PYTHON" ]]; then
if [[ $PYSPARK_DRIVER_PYTHON == *ipython* && ! $WORKS_WITH_IPYTHON