Skip to content

Instantly share code, notes, and snippets.

@yuanzhaoYZ
Created March 26, 2018 22:10
Show Gist options
  • Save yuanzhaoYZ/2673355c4176c05b4531199f563f9d70 to your computer and use it in GitHub Desktop.
Save yuanzhaoYZ/2673355c4176c05b4531199f563f9d70 to your computer and use it in GitHub Desktop.
Bash script for installing anaconda , jupyter and linking jupyter with spark
# Install Anaconda
wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
bash Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p $HOME/anaconda
export PATH="$HOME/anaconda/bin:$PATH"
echo 'export PATH="$HOME/anaconda/bin:$PATH"' >> ~/.bashrc
conda update -y -n base conda
# Install Jupyter
conda create -y -n jupyter python=3.5 jupyter nb_conda
screen -dmS jupyter
screen -r jupyter
source activate jupyter
conda install -y jupyter
conda update -y jupyter
# Start Jupyter
export SPARK_HOME=<SPARK_INSTALLATION_FOLDER>
export PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.4-src.zip
##JAVA
export JAVA_HOME=/usr/java/latest/
export LANG=en_US.UTF-8;export LC_ALL=en_US.UTF-8
jupyter notebook --no-browser --NotebookApp.ip='*' --NotebookApp.port=8900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment