WSL2에서의 Spark 설치 - Data Science | DSChloe
$ sudo apt-get install openjdk-8-jdk
$ sudo wget <https://archive.apache.org/dist/spark/spark-3.2.0/spark-3.2.0-bin-hadoop3.2.tgz>
$ sudo tar -xvzf spark-3.2.0-bin-hadoop3.2.tgz
evan@evan:/mnt/c/hadoop$ pwd
/mnt/c/hadoop
evan@evan:/mnt/c/hadoop$ ls
spark-3.2.0-bin-hadoop3.2 spark-3.2.0-bin-hadoop3.2.tgz
vi ~/.bashrc
파일을 열고 다음과 같이 코드를 작성한다.
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export SPARK_HOME=/mnt/c/spark
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$SPARK_HOME/bin:$PATH
export PYSPARK_PYTHON=/usr/bin/python3