Skip to content Skip to sidebar Skip to footer

Pyspark In Flask

I was trying the solution to access pyspark in this post Access to Spark from Flask app but when I tried this in my cmd ./bin/spark-submit yourfilename.py I get '.' is not recog

Solution 1:

'.'is not recognized as an internal or external command,
 operable program or batch file.

Above error is because you are executing in windows, try with absolute path or set SPARK_HOME environment variable and invoke bin\spark-submit. This error will go away

For flask app, run as below, it should work

set FLASK_APP=yourfilename.py
flask run

You can access your app using

http://127.0.0.1:5000/path

Post a Comment for "Pyspark In Flask"