I'm trying to run Python Script in Pyspark on cloudera VM
First I run pyspark by
$ which pyspark
$ pyspark
After launching the spark, i tried:
$ spark-submit /home/cloudera/test.py
Gives me "name 'spark' is not defined"
$ ./bin/spark-submit /home/cloudera/test.py
Gives me "SyntaxError: invalid syntax"
I know there are many similiar questions online but I still can't figure it out. Can someone please help?