<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Installing Jupyter on sandbox in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Installing-Jupyter-on-sandbox/m-p/201688#M163695</link>
    <description>&lt;P&gt;It has been a while and I believed you already got it working. But for those people want to know how to do it, I am going to show you how I did it.&lt;/P&gt;&lt;P&gt;Before I get started, I wanted to let you know I found the informative &lt;A href="https://developer.ibm.com/hadoop/2017/10/04/jupyter-hdp/" rel="nofollow noopener noreferrer" target="_blank"&gt; link&lt;/A&gt; &lt;A href="https://developer.ibm.com/hadoop/2017/10/04/jupyter-hdp/" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;/A&gt; by googling "setup Jupyter notebook at Hortonworks sandbox". Based on the link and I made some minor changes, I got it working.&lt;/P&gt;&lt;PRE&gt;####========================================================
### login as root
####========================================================
sandbox-version

== Sandbox Information ==
Platform: hdp-security
Build date: 06-18-2018
Ambari version: 2.6.2.0-155
Hadoop version: Hadoop 2.7.3.2.6.5.0-292
OS: CentOS Linux release 7.5.1804 (Core)
====

####========================================================
### Install Jupyter Dependencies
####========================================================
pip install --ignore-installed pyparsing
yum install epel-release
sudo wget &lt;A href="https://bootstrap.pypa.io/ez_setup.py" target="_blank" rel="nofollow noopener noreferrer"&gt;https://bootstrap.pypa.io/ez_setup.py&lt;/A&gt; -O - | python ;sudo yum install python-pip python-wheel python-devel gcc
pip install --upgrade pip
pip install --upgrade pip wheel pandas numpy scipy scikit-learn matplotlib virtualenv
####========================================================
### Install Jupyter
####========================================================
pip install jupyter

####========================================================
### Setup folders and files
####========================================================
jupyter notebook --generate-config
sudo mkdir -p /ibm/conf
sudo chown -R spark:hadoop /ibm
cp ~/.jupyter/jupyter_notebook_config.py /ibm/conf/

####========================================================
### Setup startup shell script
####========================================================
vi /ibm/scripts/start_jupyter.sh

#copy the paste the following contents

#! bin/bash
set -x
USER=$1
JUPYTER_HOST=sandbox-hdp.hortonworks.com
JUPYTER_PORT=8889
su - ${USER} &amp;lt;&amp;lt; EOF 
export SPARK_HOME=/usr/hdp/current/spark-client
export PYSPARK_SUBMIT_ARGS="--master yarn-client pyspark-shell"
export HADOOP_HOME=/usr/hdp/current/hadoop-client
export HADOOP_CONF_DIR=/usr/hdp/current/hadoop-client/conf
export PYTHONPATH="/usr/hdp/current/spark-client/python:/usr/hdp/current/spark-client/python/lib/py4j-0.9-src.zip"
export PYTHONSTARTUP=/usr/hdp/current/spark-client/python/pyspark/shell.py
export PYSPARK_SUBMIT_ARGS="--master yarn-client pyspark-shell"
echo "Starting Jupyter daemon on HDP Cluster ..."
jupyter notebook --config=/ibm/conf/jupyter_notebook_config.py --ip=${JUPYTER_HOST} --port=${JUPYTER_PORT}&amp;amp;
EOF
exit 0

####========================================================
### Run startup shell script
####========================================================

chown -R spark:hadoop /ibm
chmod 777 /ibm/script/start_jupyter.sh
cd /ibm/scripts
./start_jupyter.sh spark
####========================================================
### Copy the link from above step's output and paste to your computer's browser 
####========================================================
# make sure you define sandbox.hortonworks.com in your hosts file
&lt;A href="http://sandbox.hortonworks.com:8889/?token=c982c0f95222abcf2900e3aeb9d9c59cc0386cc04c6c154d" target="_blank" rel="nofollow noopener noreferrer"&gt;http://sandbox.hortonworks.com:8889/?token=c982c0f95222abcf2900e3aeb9d9c59cc0386cc04c6c154d&lt;/A&gt; &lt;/PRE&gt;&lt;P&gt;Test in Jupyter.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="91636-2018-10-06-20-55-23.jpg" style="width: 565px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/17422iF62C8B05EEA6462D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="91636-2018-10-06-20-55-23.jpg" alt="91636-2018-10-06-20-55-23.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 05:28:56 GMT</pubDate>
    <dc:creator>Howchoy</dc:creator>
    <dc:date>2019-08-18T05:28:56Z</dc:date>
  </channel>
</rss>

