Solve the Problem of ImageFont import error in CentOS

Source: Internet
Author: User

Solve the Problem of ImageFont import error in CentOS

Centos6 64-bit installation of pil has not been installed, du Niang countless, installed recently. It is hereby recorded. The main problem is that an error is reported when ImageFont is imported.

  1. After PIL installation is compiled, a prompt is displayed, indicating that the differential library is installed first.

Copied ..

This is because PIL does not compile freetype. Check lib/python2.7/site-packages/PIL/to see whether _ imagingft. so exists.

# Install the jpeg library wgethttp: // www.ijg.org/files/javassrc.v7.tar.gztar-zxvf?src.v7.tar.gzcd=-7cc= "gcc-archx86_64"./configure -- enable-shared -- enable-staticmakeinstall first

Then install the PIL library.

Let PIL support freetype Methods

1. Install freetype Development Library

yuminstallfreetype-devel

2. Download source code http://effbot.org/downloads/Imaging-1.1.7.tar.gz

3. Modify the setup. py file.

Modify

JPEG_ROOT=libinclude("/usr/local")FREETYPE_ROOT='/usr/lib64','/usr/include/freetype2/freetype'

4. view supported items

pythonsetup.pybuild_ext-i

--- FREETYPE2 support available pay attention to this item

5. Compile and install

Python setup. py install

6. The most important step is to add jpeg to the path of the import system library.

Echo "/usr/local \ lib">/etc/ld. so. conf

Ldconfig

Win764-bit pil
Attachment download:
Pil-1.1.7-win64 bit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.