0
我已經使用ambari在spark-env.sh中設置了PYSPARK_PYTHON = python3,並且當我在命令行中嘗試'pyspark'時,它使用python 3.4.3 。但是,當我使用yarn cluster模式提交作業時,它使用python 2.7.9運行。我如何使它使用python3?Pyspark在紗線集羣模式下不使用python3,即使使用PYSPARK_PYTHON = python3
我已經使用ambari在spark-env.sh中設置了PYSPARK_PYTHON = python3,並且當我在命令行中嘗試'pyspark'時,它使用python 3.4.3 。但是,當我使用yarn cluster模式提交作業時,它使用python 2.7.9運行。我如何使它使用python3?Pyspark在紗線集羣模式下不使用python3,即使使用PYSPARK_PYTHON = python3
你需要給像python3的完整路徑:
subprocess.call(['export PYSPARK_PYTHON=/usr/local/bin/python2.7'],shell=True)
我已經設置spark-env.sh與「出口PYSPARK_PYTHON =的/ usr/bin中/ python3.4 出口PYSPARK_DRIVER_PYTHON =的/ usr/bin中/python3.4「,但它仍然是一樣的。使用python2 – mankand007