如何设置Pyspark在Python 3火花env.sh.template [英] How do i setup Pyspark in Python 3 with spark-env.sh.template
问题描述
由于我在ipython3笔记本有这个问题,我想我必须改变火花env.sh.template弄好了。
Because i have this issue in my ipython3 notebook, i guess i have to change "spark-env.sh.template" somehow.
例外:Python的工人中有不同的版本,2.7比3.4司机,PySpark不能用不同的次版本上运行。
Exception: Python in worker has different version 2.7 than that in driver 3.4, PySpark cannot run with different minor versions
推荐答案
星火还没有与Python 3,如果工作,你要使用Python API,你还需要一个Python间preTER(版本2.6或更高版本)。
Spark does not yet work with Python 3.If you wish to use the Python API you will also need a Python interpreter (version 2.6 or newer).
我运行时,有同样的问题 IPython的= 1 ./pyspark
。
I had the same issue when running IPYTHON=1 ./pyspark
.
好吧速战速决
修改 VIM pyspark
和变更 PYSPARK_DRIVER_PYTHON =IPython的
行
PYSPARK_DRIVER_PYTHON="ipython2"
这就是它。
如果您要检查,其中剂量 IPython的
点,
If you want to check where dose ipython
points to,
键入这IPython的
端子和我敢打赌,那将是
Type which ipython
in terminal and I bet that'll be
/Library/Frameworks/Python.framework/Versions/3.4/bin/ipython
** **修订
火花的最新版本与Python 3所以这可能并不需要用最新版本的效果很好。
Latest version of spark works well with python 3. So this may not needed with the latest version.
这篇关于如何设置Pyspark在Python 3火花env.sh.template的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!