Matplotlib版本在python中不正确

时间:2014-07-15 11:51:35

标签: python matplotlib macports

Python说它正在使用matplotlib版本1.1.1,即使我安装了1.3.1版本。

>>> import matplotlib as mpl
>>> mpl.__version__
'1.1.1'
  • Mac OS X
  • Python 2.7
  • 安装了MacPorts

当我使用MacPorts安装py27-matplotlib(1.3.1)时,python将其报告为版本1.1.1。当我使用sudo port uninstall py27-matplotlib删除安装了MacPorts的模块时,python仍会将其报告为使用版本1.1.1。

这个版本来自哪里,如何让python使用更新的模块?

更新 sys.path输出如下:

'',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
 '/Library/Python/2.7/site-packages'

0 个答案:

没有答案