ubuntu 64位 14.04 python2.7
virtualenv 建立虚拟环境,到djangocms -p . mysite 这一步时出现错误提示pillow的png格式不支持
见http://docs.django-cms.org/en/latest/introduction/install_from_scratch.html
在django cms 文档中http://djangocms-installer.readthedocs.org/en/latest/libraries.html可查出需要额外的库进行pillow格式支持,不过安装时进行的requirement检查无法发现。
在pillow官网文档可找到解决方法http://pillow.readthedocs.org/installation.html
Many of Pillow’s features require external libraries:
libjpeg provides JPEG functionality.
Pillow has been tested with libjpeg versions 6b, 8, and 9 and libjpeg-turbo version 8.
zlib provides access to compressed PNGs
libtiff provides compressed TIFF functionality
Pillow has been tested with libtiff versions 3.x and 4.0
libfreetype provides type related services
littlecms provides color management
Pillow version 2.2.1 and below uses liblcms1, Pillow 2.3.0 and above uses liblcms2. Tested with 1.19 and 2.2.
libwebp provides the WebP format.
Pillow has been tested with version 0.1.3, which does not read transparent WebP files. Versions 0.3.0 and 0.4.0 support transparency.
tcl/tk provides support for tkinter bitmap and photo images.
openjpeg provides JPEG 2000 functionality.
Pillow has been tested with openjpeg 2.0.0 and 2.1.0.
运行如下
Prerequisites are installed on Ubuntu 14.04 LTS with:
$ sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
然后卸载重新安装pillow即可。