响应式公司网站,电子商务网站建设和技术现状,wordpress微信关注查看,网站参考页面设计在使用python中#xff0c;特别是使用第三方库的时候#xff0c;有时候会遇到一些问题#xff0c;这里就记录下遇到过的问题#xff0c;以及从网上搜索得到的解决方法。1.使用PIL中#xff0c;使用字体时#xff1a;ImportError: The _imagingft C module is not install…在使用python中特别是使用第三方库的时候有时候会遇到一些问题这里就记录下遇到过的问题以及从网上搜索得到的解决方法。1.使用PIL中使用字体时ImportError: The _imagingft C module is not installed 这是由于PIL没有编译freetype导致的解决方法可以参考http://outofmemory.cn/code-snippet/6642/python-pil-font-ImportError-The-_imagingft-C-module-is-not-installed中的方法当然也可以直接从PIL-1.1.7.win32-py2.7中直接下载已经编译好的PIL。
2.使用scipy库时无法从scipy.misc中导入imread 这个问题通过Cannot import scipy.misc.imread成功找到解决方法就是安装PIL或者Pillow我试过安装前者就可以成功从从scipy.misc中导入imreadimresizeimshow等与图像有关的方法。