小编leg*_*arc的帖子

在Mac上重新安装Matplotlib

我升级了包并破坏了我的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)安装.

macos matplotlib freetype libpng

3
推荐指数
1
解决办法
7990
查看次数

标签 统计

freetype ×1

libpng ×1

macos ×1

matplotlib ×1