title: Installing matplotlib on RedHat ideally using yum
body: <p>I can't seem to find documentation on this. Matplotlib says to run:</p>
  
  <pre><code>sudo yum install python-matplotlib
  </code></pre>
  
  <p>which installs all the dependancies and this version of matplotlib successfully:</p>
  
  <pre><code>python-matplotlib.x86_64 0:0.99.1.2-1.6.amzn1
  </code></pre>
  
  <p>However, I use python2.7, separately installed. The original (and still existing) python2.6 now imports matplotlib successfully. Is there a related matplotlib package on RedHat for python2.7? I don't know <a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=python-matplotlib" rel="nofollow noreferrer">how to use this page on python-matplotlib packages</a>.</p>
  
  <p>Other info:</p>
  
  <ul>
  <li><code>which python2.6</code> returns <code>/usr/bin/python2.6</code></li>
  <li><code>which python</code> returns <code>/usr/bin/python</code>. </li>
  <li><code>cat /proc/version</code> returns<br>
  <code>Linux version 3.14.23-22.44.amzn1.x86_64 ... (Red Hat 4.8.2-16) (GCC) ...</code></li>
  </ul>
  
  <p>Something else I tried:<br>
  I also tried to use pip2.7 instead, <a href="https://stackoverflow.com/a/9843560/2553191">installed all the dependancies</a>, and it <a href="https://stackoverflow.com/a/24663620/2553191">broke on this issue</a> concerning permissions. The solution is to reset the permissions of the problem file with:</p>
  
  <pre><code>chmod o+x /path/to/file
  </code></pre>
  
  <p>However, it's a temporary copied file. :( During the install of matplotlib it recopies this file over, so I can't set permissions on it. Here is the place it is broken:</p>
  
  <pre><code>g++ ... -lpython2.7 -o build/lib.linux-x86_64-2.7/matplotlib/backends/_backend_agg.so
  running install_lib
  copying pylab.py -&gt; /usr/lib64/python2.7/site-packages
  error: [Errno 13] Permission denied: '/usr/lib64/python2.7/site-packages/pylab.py'
  </code></pre>
  
  <p>This doesn't seem like the right way to do it, it's too cobbled together. </p>
  
  <p>Question asked first at the <a href="https://unix.stackexchange.com/q/189604/86075">Unix&amp;Linux stackexchange</a>.</p>