Matplotlib Version
Question: Having my system prepped with homebrew and using `pip install matplotlib`
after successful installation of numpy and scipy, I'm getting a successful
installation. Then, running

    
    
    $ python
    Python 2.7.6 (default, Jan 30 2014, 20:19:23) 
    [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import matplotlib
    >>> matplotlib.__version__
    '1.1.1'
    

This is a very outdated version and noone of my programs run with it. I used
`pip uninstall matplotlib` and redid it with `pip install 'the url for 1.3.1'`
and it still reads version 1.1.1. Is there a way I can manually delete all
python libraries, even python itself, and restart from scratch? Or is this an
obvious fix for this?

EDIT: I'm running Mac OS X version 10.9. I just reinstalled python 2.7 with
scipy, numpy, and matplotlib through macports. Is there a very basic way to
see where, when I `import matplotlib` from the python environment, it is
calling it from? Like `which` in the terminal? I began using homebrew but
switched to macports for more control. Can that be a problem? Do I need to
completely remove homebrew?

I did get this message at first: `Warning: Error parsing file
/Applications/MacPorts/Python 2.7/Python Launcher.app/Contents/MacOS/Python
Launcher: Error opening or reading file` but after running `$ sudo port -f
deactivate python27` followed by `sudo port activate python27` I no longer
have that warning, but I wanted to include this detail for completeness.

EDIT 2: Could some things be installing to `opt/local/bin` when they need to
be installed to `usr/local/bin`?

EDIT 3: To shed some light on this, `print scipy.__version__` reads `0.11.0`
which is several outdated, `print numpy.__version__` reads `1.6.2` which is
also outdated. However I attempt to install says the installation was
successful, which I don't doubt. I suspect it's not linked up together in a
correct way. Is there a way delete everything that is connected to python at
all and restart?

FINAL EDIT: I think the easiest way to handle this is to run `which python`
and see what options you have to run python. Because I used homebrew and
macports at this time (not recommended) I had four options- a macports
install, a package install from python.org, a homebrew install, and the
standard 2.6 from Apple. Iterate through these and find which one your
installer (`pip` or `easy_install`) is placing your frameworks and run that
python when you need certain dependencies. The best way is use only one
package manager and run virtual environments if you need different
dependencies, but we're all learning as we go.


Answer: Using Matplotlib in OSX can give you problems. [In this
page](http://matplotlib.org/users/installing.html#build-osx), they say:

> The build situation on OSX is complicated by the various places one can get
> the libpng and freetype requirements (darwinports, fink, /usr/X11R6) and the
> different architectures (e.g., x86, ppc, universal) and the different OSX
> version (e.g., 10.4 and 10.5).

In the official page of Matplotlib they recommend to use the mkpg installer:

> The mkpg installer will have a “zip” extension, and will have a name like
> matplotlib-1.2.0-py2.7-macosx10.5_mpkg.zip. The name of the installer
> depends on which versions of python, matplotlib, and OSX it was built for.
> [...] install to a directory like /Library/Python/2.7/site-packages/ (exact
> path depends on your python version).

In the [OSX-Notes Section](http://matplotlib.org/faq/installing_faq.html) you
have more information about this installing.

**Edited** :

I haven't found any MPKG but you can use
[this](http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.3.1/)
DMG.

