0

I downloaded apache pyspark through brew download and also tried download directly from https://spark.apache.org/. But after download I tried type "pyspark" directly in terminal and countered this errors. enter image description here

I also tried all the steps that are available in this manual: https://medium.com/@GalarnykMichael/install-spark-on-mac-pyspark-453f395f240b. But also get error when run spark in jupyter notebook, which are:

enter image description here

1
  • 1
    from my experience the easiest way is to install pyspark via pip (even in anaconda). This has always worked for me and is very convenient Commented Oct 26, 2019 at 17:41

1 Answer 1

1

in your screenshot the error is at line 14, you have not imported sparksession. Sparksession in not a pyspark function.

Add : from pyspark.sql import SparkSession to your code, it might give others as per your script but will fix this one. Please share your script as well.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.