问题描述:
spark2 中python 版本为2.6,当执行操作的时候会报错,如下提示
step1:下载anaconda3 wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
并进如下载目录执行bash Anaconda3-5.0.1-Linux-x86_64.sh 进行安装
step2: 配置zeppelin UI 中配置spark 中python的位置,如下图
step3: 如果直接运行会提示
Exception:
Python in worker has different version 2.7 than that in driver 3.5, PySpark cannot run with different minor versions,
后面还会提示你说请确保正确设置PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON
所以在spark2-client的配置文件spark-env.sh添加如下两行配置:
export PYSPARK_PYTHON=/opt/anaconda3/bin/python
export PYSPARK_DRIVER_PYTHON=/opt/anaconda3/bin/python
最后保存重启。
版权声明:本文为qq_40719649原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。