我升级了包并破坏了我的matplotlib安装.现在,当我运行时import matplotlib.pyplot as plt,我收到以下错误:
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/matplotlib/ft2font.so, 2):
Library not loaded: /usr/local/lib/libpng16.16.dylib
Referenced from: /usr/local/lib/libfreetype.6.dylib
Reason: image not found
Run Code Online (Sandbox Code Playgroud)
为了解决这个问题,我卸载了freetype和libpng brew.具体来说,我使用brew uninstall freetype && brew cleanup && brew install freetype和相同的命令libpng.我重新安装了matplotlib(pip uninstall matplotlib,然后pip install matplotlib).
这没有解决它,我不知道下一步是什么能够有一个有效的matplotlib(.pyplot)安装.