bin/pyspark will setup the PYTHONPATH of py4j for you, or you need to
setup it by yourself.

export PYTHONPATH=$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip

On Fri, Nov 7, 2014 at 8:15 AM, Pagliari, Roberto
<rpagli...@appcomsci.com> wrote:
> I’m getting this error when importing hive context
>
>
>
>>>> from pyspark.sql import HiveContext
>
> Traceback (most recent call last):
>
>   File "<stdin>", line 1, in <module>
>
>   File "/path/spark-1.1.0/python/pyspark/__init__.py", line 63, in <module>
>
>     from pyspark.context import SparkContext
>
>   File "/path/spark-1.1.0/python/pyspark/context.py", line 30, in <module>
>
>     from pyspark.java_gateway import launch_gateway
>
>   File "/path/spark-1.1.0/python/pyspark/java_gateway.py", line 26, in
> <module>
>
>     from py4j.java_gateway import java_import, JavaGateway, GatewayClient
>
> ImportError: No module named py4j.java_gateway
>
>
>
> I cannot find py4j on my system. Where is it?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to