3

I am using Spyder(Anaconda) on Mac for Python development. I also have installed PySpark on my machine, which i use from the terminal. Is it possible to use both of them in Spyder, or somehow manage to import the spark context into my python 2.7?

thebluephantom
  • 16,458
  • 8
  • 40
  • 83
Arslán
  • 1,711
  • 2
  • 12
  • 15

1 Answers1

0

yes it is possible just install

pip install findspark

then run

findspark.init()

https://stackoverflow.com/a/34763240

then try to import pyspark if it works then good or else add pyspark to pythonpath & try again

# Add the PySpark classes to the Python path:
export PYTHONPATH=$SPARK_HOME/python/:$PYTHONPATH
Community
  • 1
  • 1
shivsn
  • 7,680
  • 1
  • 26
  • 33