โ04-14-2022 11:25 AM
When I try to start pyspark session in pycharm. It throws me this error "RuntimeError("Java gateway process exited before sending its port number"). Could anyone help me to solve this?
โ04-14-2022 04:31 PM
@Aravind Aโ , What are the dependencies and versions you installed?
Install pyspark + openjdk
%pip install pyspark==2.4.8
!apt-get install openjdk-8-jdk-headless -qq > /dev/nullBuild spark session
from pyspark.sql import SparkSession
spark = SparkSession.builder\
.appName("Practiceโ)\
.getOrCreate()Note that:
Spark runs on Java 8/11, Scala 2.12/2.13, Python 3.6+ and R 3.5+.
Python 3.6 support is deprecated as of Spark 3.2.0.
Java 8 prior to version 8u201 support is deprecated as of Spark 3.2.0.
For the Scala API, Spark 3.2.1 uses Scala 2.12. You will need to use a compatible Scala version (2.12.x).
โ04-14-2022 04:31 PM
@Aravind Aโ , What are the dependencies and versions you installed?
Install pyspark + openjdk
%pip install pyspark==2.4.8
!apt-get install openjdk-8-jdk-headless -qq > /dev/nullBuild spark session
from pyspark.sql import SparkSession
spark = SparkSession.builder\
.appName("Practiceโ)\
.getOrCreate()Note that:
Spark runs on Java 8/11, Scala 2.12/2.13, Python 3.6+ and R 3.5+.
Python 3.6 support is deprecated as of Spark 3.2.0.
Java 8 prior to version 8u201 support is deprecated as of Spark 3.2.0.
For the Scala API, Spark 3.2.1 uses Scala 2.12. You will need to use a compatible Scala version (2.12.x).
โ04-15-2022 06:47 AM
@Aashita Ramtekeโ , Pyspark version 3.2.1
โ04-20-2022 09:36 AM
Kindly replace the version when you install python dependencies from 2.4.8 to 3.2.1.. It should work. Thanks.