spark-submit will launch a PythonGatewayServer, which is used to communicate with python code and Spark JVM process.