title: How to install libraries to python in zeppelin-spark2 in HDP
body: <p>I am using HDP Version: 2.6.4</p>
  
  <p>Can you provide a step by step instructions on how to install libraries to the following python directory under spark2 ?</p>
  
  <p>The sc.version (spark version) returns </p>
  
  <pre><code>res0: String = 2.2.0.2.6.4.0-91
  </code></pre>
  
  <p>The spark2 interpreter name and value is as following</p>
  
  <pre><code>zeppelin.pyspark.python:    /usr/local/Python-3.4.8/bin/python3.4
  </code></pre>
  
  <p>The python version and current libraries are</p>
  
  <pre><code>%spark2.pyspark
  
  import pip
  import sys
  
  sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()])
  
  print("--")     
  print (sys.version)
  print("--")
  print(installed_packages_list)
  
  --
  3.4.8 (default, May 30 2018, 11:05:04) 
  [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]
  --
  ['pip==9.0.1', 'setuptools==28.8.0']
  </code></pre>
  
  <h2>Update 1: <code>using pip install [package name]</code> actually leads to two problems</h2>
  
  <p>1) The HDP is pointing at python2.6 rather than python3.4.8</p>
  
  <p>2) pip3 is not there for some reason</p>
  
  <p>Therefore, I am thinking of installing miniconda and pointing Zeppelin there and installing all the packages in conda to prevent conflict between python 2.6 and 3.4.8</p>