How to installation spark standalone mode in ubuntu I am trying to install spark standalone but show error.
How i can solve this problem.


Java version :- 1.8.0_131
Spark:- 2.2.0
Hadoop: 2.7.4
bashrc file setting 
Hadoop file location in local System: /usr/lib/hadoop/hadoop-2.7.4
Spark file location: /opt/spark/spark


File:

-----------------------------
#JAVA HOME directory setup
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin

#HBASE HOME setup
export HBASE_HOME=/usr/lib/hbase/hbase-1.3.1
export PATH=$PATH:$HBASE_HOME/bin

#HADOOP Setup
export HADOOP_HOME=/usr/lib/hadoop/hadoop-2.7.4
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME  
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export HADOOP_PID_DIR=$HADOOP_HOME/hadoop2_data/hdfs/pid

#spark setup
export SPARK_HOME=/opt/spark/spark
export PATH=$SPARK_HOME/bin:$PATH
#scala 
export SCALA_HOME=/usr/local/src/scala/scala-2.11.11
export PATH=$SCALA_HOME/bin:$PATH
------------------------------------------------------------
I'd recommend using pip pyspark, as it's super easy
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install pyspark
$ pyspark

You can modify Spark configuration by adding files to venv/lib/python3.x/site-packages/pyspark/conf/