Python使用spark时出現版本不同的错误
异常描述:
Exception: Python in worker has different version 2.7 than that in driver 3.4, PySpark cannot run with different minor versions.Please check environment variables PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON are correctly set.
问题解决:
import os
os.environ["PYSPARK_PYTHON"]="/usr/bin/python3"
指向想要的python版本的路径即可
还没有评论,来说两句吧...