title: How to install graphviz in Ubuntu 15 to plot a decision tree for XGBoost?
body: <p>I want to plot the decision tree of XGBoost. 
  I followed the instructions from this <a href="http://machinelearningmastery.com/visualize-gradient-boosting-decision-trees-xgboost-python/" rel="nofollow noreferrer">webpage</a>.
  I get this error:</p>
  
  <pre><code> ImportError: You must install graphviz to plot tree
  </code></pre>
  
  <p>I tried to install graphviz_2.38.0-1~saucy_amd64.deb from <a href="http://www.graphviz.org/Download_linux_ubuntu.php" rel="nofollow noreferrer">graphviz</a>.
  But I get this error:</p>
  
  <pre><code> *Dependency is not satisfiable:libgraphviz4(&gt;=2.18)*
  </code></pre>
  
  <p>So I did what is on this <a href="https://stackoverflow.com/questions/29630434/graphviz-installation-ubuntu-14-04">link</a></p>
  
  <p>As it still does not work I downloaded the source code:
  graphviz-2.40.1.tar.gz  But it still does not work.
  I thought that maybe I have installed it in the wrong path. So what does this mean: Make sure that the directory containing the dot executable is on your systems’ path?</p>
  
  <p>I have installed it in /etc.</p>
  
  <p>I use a virtual environment in conda </p>
  
  <p>Any suggestions on what am I doing wrong?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I used pip install graphviz.
  now I get this error: </p>
  
  <pre><code>CalledProcessError: Command '['dot', '-Tpng']' returned non-zero exit status 1
  </code></pre>
  
  <p>Any idea?</p>