title: /usr/bin/python vs /opt/local/bin/python2.7 on OS X
body: <p>Can you shed some light on the interaction between the Python interpreter distributed with OS X and the one that can be installed through MacPorts?</p>
  
  <p>While installing <code>networkx</code> and <code>matplotlib</code> I am having difficulties with the interaction of <code>/usr/bin/python</code> and <code>/opt/local/bin/python2.7</code>. (The latter is itself a soft pointer to <code>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7</code>)</p>
  
  <p>How can I be certain which Python, pip, and Python libraries I am using at any one time?</p>
  
  <p>More importantly, it appears that installing <code>matplotlib</code> is not possible on Lion. It fails with <code>Requires numpy 1.6 or later to build.  (Found 1.5.1)</code>. If I upgrade by running <code>sudo pip install --upgrade numpy</code>, it does not help. Subsequently attempting to install <code>matplotlib</code> (<code>sudo /usr/local/bin/pip install matplotlib</code>) still fails with the same (<code>Requires numpy 1.6...</code>) message. How can I install matplotlib?</p>