Thursday 15 March 2012

python - Matplotlib on Windows - dependency unresolved -



python - Matplotlib on Windows - dependency unresolved -

i have had problems using matplotlib after windows update. i'm running windows 7 service pack 1 32 bit , installed python , matplotlib part of python(x,y)-2.7.6.1. problem appears related freetype, import fails on ft2font shown in stack trace below:

in [1]: import matplotlib in [2]: matplotlib.use('agg') in [3]: import matplotlib.pyplot plt --------------------------------------------------------------------------- importerror traceback (most recent phone call last) <ipython-input-3-eff513f636fd> in <module>() ----> 1 import matplotlib.pyplot plt c:\python27\lib\site-packages\matplotlib\pyplot.py in <module>() 22 23 import matplotlib ---> 24 import matplotlib.colorbar 25 matplotlib import _pylab_helpers, interactive 26 matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike c:\python27\lib\site-packages\matplotlib\colorbar.py in <module>() 27 import matplotlib.artist martist 28 import matplotlib.cbook cbook ---> 29 import matplotlib.collections collections 30 import matplotlib.colors colors 31 import matplotlib.contour contour c:\python27\lib\site-packages\matplotlib\collections.py in <module>() 21 import matplotlib.artist artist 22 matplotlib.artist import allow_rasterization ---> 23 import matplotlib.backend_bases backend_bases 24 import matplotlib.path mpath 25 matplotlib import _path c:\python27\lib\site-packages\matplotlib\backend_bases.py in <module>() 48 49 import matplotlib.tight_bbox tight_bbox ---> 50 import matplotlib.textpath textpath 51 matplotlib.path import path 52 matplotlib.cbook import mpldeprecation c:\python27\lib\site-packages\matplotlib\textpath.py in <module>() 9 matplotlib.path import path 10 matplotlib import rcparams ---> 11 import matplotlib.font_manager font_manager 12 matplotlib.ft2font import ft2font, kerning_default, load_no_hinting 13 matplotlib.ft2font import load_target_light c:\python27\lib\site-packages\matplotlib\font_manager.py in <module>() 51 import matplotlib 52 matplotlib import afm ---> 53 matplotlib import ft2font 54 matplotlib import rcparams, get_cachedir 55 matplotlib.cbook import is_string_like importerror: dll load failed: specified procedure not found.

i have tried reinstalling python(x,y), did not resolve problem.

from other answers on stackoverflow have learned mutual failures here include missing msvcr90.dll , msvcp90.dll files. downloaded dependency walker , opened c:\python27\lib\site-packages\matplotlib\ft2font.pyd. showed issues these files , libbz2.dll. downloaded , copied these files c:\windows\system32.

i have tried checking path , pythonpath environment variables, appear reference python install correctly:

path: c:\python27\lib\site-packages\pyqt4;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\program files\novell\groupwise;c:\program files\miktex 2.9\miktex\bin\;c:\program files\microsoft sql server\80\tools\binn\;c:\program files\microsoft sql server\110\tools\binn\;c:\program files\common files\aspentech shared\;c:\python27;c:\python27\dlls;c:\python27\scripts;c:\python27\gnuplot\binary;c:\program files\pythonxy\scite-3.3.2-3;c:\program files\pythonxy\console;c:\mingw32-xy\bin;c:\python27\lib\site-packages\vtk pythonpath: c:\python27\dlls

the problem manifests when using agg backend shown in session above, don't think has qt or tk.

it appears problem caused application installing different/incompatible version of bz2 in c:\windows\system32\libbz2.dll. beingness used instead of dll of same name in python27 directory installed python(x,y). how situation showed in dependency walker:

you can see there wrong libbz2.dll though dependency walker doesn't list dependency error such. renaming or deleting version in c:\windows\system32\ caused dependency resolved version in c:\python27\dlls.

python matplotlib freetype

No comments:

Post a Comment