Python matlplot lib在干净的numpy安装中失败

Python matlplot lib在干净的numpy安装中失败,python,python-2.7,numpy,matplotlib,Python,Python 2.7,Numpy,Matplotlib,我正在尝试在OpenSUSE 11.4上安装matplotlib 使用pip清洁安装Numpy(成功) 然后清洁安装matplotlib(成功) 然后当我跑的时候 import matplotlib matplotlib.test() 我明白了 然后是一系列错误,比如 ====================================================================== ERROR: Failure: AttributeError ('module' ob

我正在尝试在OpenSUSE 11.4上安装
matplotlib

使用
pip清洁安装Numpy(成功)

然后清洁安装
matplotlib
(成功)

然后当我跑的时候

import matplotlib
matplotlib.test()
我明白了

然后是一系列错误,比如

======================================================================
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'
最后

======================================================================
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
======================================================================
错误:的测试套件
----------------------------------------------------------------------
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python2.7/site packages/nose/suite.py”,第208行,运行中
self.setUp()
文件“/usr/local/lib/python2.7/site packages/nose/suite.py”,第291行,在安装程序中
self.setupContext(祖先)
setupContext中的文件“/usr/local/lib/python2.7/site packages/nose/suite.py”,第314行
try_run(上下文、名称)
文件“/usr/local/lib/python2.7/site packages/nose/util.py”,第469行,在try\u run中
返回func()
文件“/usr/local/lib64/python2.7/site packages/matplotlib/tests/_init__.py”,第28行,在安装程序中
从matplotlib.backends导入后端\u agg、后端\u pdf、后端\u svg
文件“/usr/local/lib64/python2.7/site packages/matplotlib/backends/backend_agg.py”,第27行,在
从matplotlib.backend_base导入RenderBase\
文件“/usr/local/lib64/python2.7/site packages/matplotlib/backend_base.py”,第50行,在
将matplotlib.textpath导入为textpath
文件“/usr/local/lib64/python2.7/site packages/matplotlib/textpath.py”,第14行,在
从matplotlib.mathtext导入MathTextParser
文件“/usr/local/lib64/python2.7/site packages/matplotlib/mathtext.py”,第62行,在
将matplotlib.\u png导入为\u png
ImportError:numpy.core.multiarray导入失败
----------------------------------------------------------------------
在9.038秒内运行了50次测试
失败(跳过=1,错误=37)
错误的

结果表明,以前有人用
zyper
而不是
pip
安装了
numpy
(v1.5),默认的
numpy
版本是1.5而不是1.8(由
pip
安装)。不知不觉地,它们安装到

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


记住接受你自己的答案,当它会让你。
/usr/local/lib64/python2.7/site-packages/numpy # PIP
/usr/lib64/python2.7/site-packages/numpy # Zypper