title: How to properly install matplotlib on mac 10.7.5? And why is the command "conda" not found after Anaconda is successfully installed?
body: <p>I tried for a long time to work with python on this Mac. I tried to remove python completely from my mac. Then I realized it was hard to get rid of this default python. Fortunately, I read in the internet that it's a bad idea to remove that one python that come with Mac before I figured out how to remove it. Then I also installed python, numpy, scipy, matplotlib using *.dmg packages. After all the effort, I still get this error message every time I import pylab. Please help me? Anyone?</p>
  
  <pre><code>$python
  
  Python 2.7.4 (v2.7.4:026ee0057e2d, Apr  6 2013, 11:43:10) 
  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import pylab
  
  
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/pylab.py", line 1, in &lt;module&gt;
    from matplotlib.pylab import *
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/pylab.py", line 221, in &lt;module&gt;
   `from matplotlib import mpl  # pulls in most modules
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/mpl.py", line 2, in &lt;module&gt;
   `from matplotlib import axis
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/axis.py", line 14, in &lt;module&gt;
   `import matplotlib.text as mtext
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/text.py", line 31, in &lt;module&gt;
   `from matplotlib.backend_bases import RendererBase
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/backend_bases.py", line 48, in &lt;module&gt;
   `import matplotlib.textpath as textpath
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/textpath.py", line 9, in &lt;module&gt;
   `from matplotlib.mathtext import MathTextParser
  File "/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/mathtext.py", line 52, in &lt;module&gt;
   `import matplotlib._png as _png
  ImportError: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/_png.so, 2): Library not loaded: /opt/local/lib/libpng14.14.dylib
  Referenced from: /Library/Python/2.7/site-packages/matplotlib-1.1.0-py2.7-macosx-10.7-intel.egg/matplotlib/_png.so
  Reason: image not found
  </code></pre>
  
  <p>Besides, I followed the instruction on <a href="http://ipython.org/install.html" rel="nofollow">http://ipython.org/install.html</a> to install Anaconda. After Anaconda is installed I went to the next step</p>
  
  <pre><code>$ conda update conda
  </code></pre>
  
  <p>and got this</p>
  
  <pre><code>"-bash: conda: command not found"
  </code></pre>
  
  <p>I searched in the net, but it seems no one else has this problem. Can anyone give me a hint here? Many thanks!</p>
  
  <hr>
  
  <p>In my directory /usr/bin I have</p>
  
  <pre><code>python python-config python2.5 python2.5-config python2.6 python2.6-config python2.7 python2.7-config
  </code></pre>
  
  <p>With command
      which python</p>
  
  <p>I got <code>/Library/Frameworks/Python.framework/Versions/2.7/bin/python</code></p>
  
  <p>with
      which ipython</p>
  
  <p>I got <code>/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython</code></p>
  
  <p>For numpy I downloaded the package numpy-1.7.0-py2.7-python.org-macosx10.6.dmg, scipy-0.12.0-py2.7-python.org-macosx10.6.dmg for scipy, and matplotlib-1.2.0-py2.7-python.org-macosx10.6.dmg for matplotbib.I downloaded *10.6.dmg because that's what I found...I can not find something like *10.7.dmg </p>
  
  <p>I don't have .bashrc or .bashrc_profile. But I think .profile will do, and it reads like this</p>
  
  <pre><code># MacPorts Installer addition on 2012-03-07_at_18:55:26: adding an appropriate PATH variable for use with MacPorts.
  export PATH=/opt/local/bin:/opt/local/sbin:$PATH
  # Finished adapting your PATH environment variable for use with MacPorts.
  export TERM="xterm-color"
  alias ls="ls -G"
  export PS1="[\[\e[33m\]\u@\H \[\e[32m\]\w\[\e[0m\]]\n[\[\e[31m\]\!\[\e[0m\]] &gt; "
  # Setting PATH for Python 2.7
  # The orginal version is saved in .profile.pysave
  PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
  export PATH
  </code></pre>
  
  <p>When I type in </p>
  
  <p>$port</p>
  
  <p>it says <code>-bash: port: command not found</code>
  Should that worry me?
  Shall I also out comment the line</p>
  
  <blockquote>
    <p><code>export PATH=/opt/local/bin:/opt/local/sbin:$PATH</code></p>
  </blockquote>
  
  <p>as well?</p>