0

I installed pyspark from anaconda like

  $ conda install pyspark

after that in my jupyter notebook it works fine, but in the tutorial https://mortada.net/3-easy-steps-to-set-up-pyspark.html is mentioned that you have to set up the environment variables like

  $ export SPARK_HOME=~/spark-2.2.0-bin-hadoop2.7
  $ export PYSPARK_PYTHON=~/anaconda/bin/python

When I tried to rerun pyspark in my jupyter notebook the next error appear

FileNotFoundError: [Errno 2] No such file or directory: '/home/jogabell/Documentos/programas/spark-2.4.7-bin-hadoop2.7/./bin/spark-submit': '/home/jogabell/Documentos/programas/spark-2.4.7-bin-hadoop2.7/./bin/spark-submit'

My jupyter notebook look like:

  from pyspark import SparkContext 
  sc = SparkContext(master="local[4]")
  print(sc)

Help me to fix it, please.

1 Answer 1

0

I solved it.

First, it was missing the "spark-2.4.7-bin-hadoop2.7" file, so I download it from https://spark.apache.org/downloads.html. Then uncompress the tar file in the path (in my case): /home/jogabell/Documentos/programas

Thas was all.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .