Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pyspark: Error executing Jupyter command while running a file using spark-submit

I am able to run pyspark and run a script on Jupyter notebook. But when I try to run the file from terminal using spark-submit, getting this error:

Error executing Jupyter command file path [Errno 2] No such file or directory

Can anyone help me what's wrong with my config?

I'm using Python 2.7 and Spark 1.6

like image 921
Q Bit Avatar asked Sep 30 '17 23:09

Q Bit


People also ask

How do I get spark from Jupyter notebook?

There are two ways to get PySpark available in a Jupyter Notebook: Configure PySpark driver to use Jupyter Notebook: running pyspark will automatically open a Jupyter Notebook. Load a regular Jupyter Notebook and load PySpark using findSpark package.


1 Answers

These problem occurs because you have set jupyter to run pyspark script . Now you should unset PYSPARK_DRIVER_PYTHON variable command for the same is $ unset PYSPARK_DRIVER_PYTHON then try spark-submit again ./bin/spark-submit examples/src/main/python/streaming/network_wordcount.py localhost 9999.

like image 149
Shubham Sharma Avatar answered Oct 24 '22 01:10

Shubham Sharma