matlplot lib fails on clean numpy installation
Question: I'm trying to install `matplotlib` on OpenSUSE 11.4

Clean installation of Numpy with `pip` (success)

Then clean installation of `matplotlib` (success)

Then when I run

    
    
    import matplotlib
    matplotlib.test()
    

I get

    
    
    RuntimeError: module compiled against API version 6 but this version of numpy is 4
    RuntimeError: module compiled against API version 6 but this version of numpy is 4
    ...
    ...    
    EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEERuntimeError: module compiled against API version 6 but this version of numpy is 4
    ES.............
    

Then a bunch of errors like

    
    
    ======================================================================
    ERROR: Failure: AttributeError ('module' object has no attribute 'test_agg')
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/nose/loader.py", line 400, in loadTestsFromName
        module = resolve_name(addr.module)
      File "/usr/local/lib/python2.7/site-packages/nose/util.py", line 321, in resolve_name
        obj = getattr(obj, part)
    AttributeError: 'module' object has no attribute 'test_agg'
    
    ======================================================================
    ERROR: Failure: AttributeError ('module' object has no attribute 'test_arrow_patches')
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/nose/loader.py", line 400, in loadTestsFromName
        module = resolve_name(addr.module)
      File "/usr/local/lib/python2.7/site-packages/nose/util.py", line 321, in resolve_name
        obj = getattr(obj, part)
    AttributeError: 'module' object has no attribute 'test_arrow_patches'
    

And finally

    
    
    ======================================================================
    ERROR: test suite for <module 'matplotlib.tests' from '/usr/local/lib64/python2.7/site-packages/matplotlib/tests/__init__.pyc'>
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 208, in run
        self.setUp()
      File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp
        self.setupContext(ancestor)
      File "/usr/local/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext
        try_run(context, names)
      File "/usr/local/lib/python2.7/site-packages/nose/util.py", line 469, in try_run
        return func()
      File "/usr/local/lib64/python2.7/site-packages/matplotlib/tests/__init__.py", line 28, in setup
        from matplotlib.backends import backend_agg, backend_pdf, backend_svg
      File "/usr/local/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 27, in <module>
        from matplotlib.backend_bases import RendererBase,\
      File "/usr/local/lib64/python2.7/site-packages/matplotlib/backend_bases.py", line 50, in <module>
        import matplotlib.textpath as textpath
      File "/usr/local/lib64/python2.7/site-packages/matplotlib/textpath.py", line 14, in <module>
        from matplotlib.mathtext import MathTextParser
      File "/usr/local/lib64/python2.7/site-packages/matplotlib/mathtext.py", line 62, in <module>
        import matplotlib._png as _png
    ImportError: numpy.core.multiarray failed to import
    
    ----------------------------------------------------------------------
    Ran 50 tests in 9.038s
    
    FAILED (SKIP=1, errors=37)
    False
    


Answer: Turns out someone had previously install `numpy` (v 1.5) using `zypper`
instead of `pip`, and the default `numpy` version was going to 1.5 instead of
1.8 (as installed by `pip`). Insidiously, they install to

    
    
    /usr/local/lib64/python2.7/site-packages/numpy # PIP
    

and

    
    
    /usr/lib64/python2.7/site-packages/numpy # Zypper
    

