Amazon EMR Pyspark Module not found

后端 未结 3 1235
故里飘歌
故里飘歌 2021-02-20 04:32

I created an Amazon EMR cluster with Spark already on it. When I run pyspark from the terminal it goes into the pyspark terminal when I ssh into my cluster.

I uploaded a

3条回答
  •  遥遥无期
    2021-02-20 05:30

    Try using findspark: Install via shell using pip install findspark.

    Sample code:

    # Import package(s).
    import findspark
    findspark.init()
    
    from pyspark import SparkContext
    from pyspark.sql import SQLContext
    

提交回复
热议问题