Zeppelin doesn't need to take care of py4j, it is spark's responsibility.
As long as you set SPARK_HOME, spark will find py4j properly.
Michaël Van de Borne 于2018年1月23日周二 下午10:37写道:
> As long as SPARK_HOME is concerned, this might work.
> However, other variables, such as PYTHONPATH and SPARK_Y
As long as SPARK_HOME is concerned, this might work.
However, other variables, such as PYTHONPATH and SPARK_YARN_USER_ENV should
be defined in zeppelin-env.sh as well.
Without those variables, zeppelin cannot access, for instance, py4j or
pyspark.
And guess where py4j sits? in SPARK_HOME/python/lib
Just remove SPARK_HOME in spark-env.sh, and instead define them in spark’s
interpreter setting. You can create 2 spark interpreter, one for spark 1.6,
another for spark 2. Only difference between them is the SPARK_HOME you
defined in interpreter setting.
Michaël Van de Borne 于2018年1月23日周二 下午6:42