在ubuntu下从源码安装matplotlib的时候出现这样的错误:
src/ft2font.h:16:22: fatal error: ft2build.h: No such file or directory
src/_png.cpp:10:20: fatal error: png.h: No such file or directory
通过查找编译信息,发现matplotlib依赖于freetype2和libpng等开发包
具体解决方案如下:
(1)安装freetype2开发包:
  sudo apt-get install libfreetype6-dev
(2)安装png开发包:
   sudo apt-get install libpng-dev
(3)安装matplotlib
  sudo python setup.py install
  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-07-21
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-07
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案