##简述
python code中有import matplotlib,但是使用的Ubuntu 16.04 64bit上的python3.5没有这个module,需要进行安装。
##安装
使用如下命令开始安装:

pip3 install matplotlib

发现提示如下:

freetype: no  [The C/C++ header for freetype2 (ft2build.h) could not be found.  You may need to install the development package.]
png: no  [pkg-config information for 'libpng' could not be found.]
* The following required packages can not be built:
                            * freetype, png

说明缺少依赖的包freetype和libpng。
###安装libpng
使用如下命令:

sudo apt-get install libpng-dev

###安装freetype

cd ~/Downloads
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.6.5.tar.gz
tar -zxvf freetype-2.6.5.tar.gz
cd freetype-2.6.5/
./congfigure
sudo make
sudo make install

###继续安装matplotlib
再用命令:

sudo pip3 install matplotlib

发现终端卡住了……
需要耐心等待,过了十来分钟后,看到pip还安装了其他的缺少的东西,并将matplotlib安装完成:
这里写图片描述

简述python code中有import matplotlib,但是使用的Ubuntu 16.04 64bit上的python3.5没有这个module,需要进行安装。安装使用如下命令开始安装:pip3 install matplotlib发现提示如下:freetype: no [The C/C++ header for freetype2 (ft2build.h) could not be f
一,freetype 错误如下: freetype: no  [The C/C++ header for freetype2 (ft2build.h)  could not be found.  You may need to install the development package.] 解决方法: wget http://download.savannah.gnu.org/re
python多种方法压缩图片,opencv、PIL、tinypng压缩图片文章目录:1 python+opncv实现图片的压缩2 python+PIL实现图片的压缩3 python+tinypng实现图片的压缩3.1 tinypng介绍3.2 tinypng压缩图片API使用3.2.1 tingypng安装3.2.2 tingypng安装3.2.3 tingypng优缺点:4 python+pngquant实现图片的压缩 1 python+opncv实现图片的压缩 class Compress_img:
.提示缺少 png 和 freetype 依赖库 freetype: no [The C/C++ header for freetype2 (ft2build.h) could not be found. You may need to install the development package.] 用python3.6.6 写了一段很简单的图像卷积处理代码,然后很奇怪的,出现一段报错: libpng warning: iCCP: cHRM chunk does not match sRGB 卷积代码如下: import matplotlib.pyplot as plt import pylab import cv2 import numpy as np img = plt.imread("Test.jpg",0) #在这里读取图片 # img = plt.imread("Test2.jpg"
安装 php 时,需要先安装 gd-2.0.33.tar.gz , 但在编译 gd-2.0.33.tar.gz 时出现了如下错误: /usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a s
问题记录: Ubuntu版本为:20.04 问题:libpng12.so.0: cannot open shared object file: No such file or directory 安装libpng12.so.0: wget http://kr.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb sudo dpkg -i libpng12-0_1.2.54-1ubuntu1_a
环境:ubuntu,python3.6 出现libpng warning警告的原因是:新版本的libpng对关于iCCP采用了更严苛的约束,一些其他格式的图片(例如jpg格式等)错误地采用了png为后缀或者颜色通道、位深度不对等。 解决办法:使用ImageMagic进行转化为.png格式的文件 ImageMagic的安装:sudo apt-getn install imagemagic