Python Error installing pillow (Ubuntu)

Source: Internet
Author: User

Packages that may be used for image processing: Pillow
The error messages that you may encounter during installation include Setuptoolskeyword, you need to execute a command to install the basic environment:

apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-dev

When you execute this command, you may encounter the problem of not finding the package, because I replaced the source for the reason, I was to replace the sources for Ali's mirror, although the speed is faster, but I can not find the installation package error, the processing method is to swap the mirror source back to the original, execute the following command:

mv /etc/apt/sources.list{,.bak}vim /etc/apt/sources.list

In the editor that opens, enter the following URL:

Deb Http://us.archive.ubuntu.com/ubuntu/trusty main RESTRICTEDDEB-SRC http://us.archive.ubuntu.com/ubuntu/trusty Main Restricteddeb http://us.archive.ubuntu.com/ubuntu/trusty-updates main RESTRICTEDDEB-SRC/http Us.archive.ubuntu.com/ubuntu/trusty-updates Main Restricteddeb Http://us.archive.ubuntu.com/ubuntu/trusty UNIVERSEDEB-SRC http://us.archive.ubuntu.com/ubuntu/trusty Universedeb http://us.archive.ubuntu.com/ubuntu/ Trusty-updates universedeb-src http://us.archive.ubuntu.com/ubuntu/trusty-updates universedeb/http Us.archive.ubuntu.com/ubuntu/trusty multiversedeb-src http://us.archive.ubuntu.com/ubuntu/trusty Multiversedeb Http://us.archive.ubuntu.com/ubuntu/trusty-updates multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ Trusty-updates multiversedeb http://us.archive.ubuntu.com/ubuntu/trusty-backports main restricted universe MULTIVERSEDEB-SRC http://us.archive.ubuntu.com/ubuntu/trusty-backports main restricted universe Multiversedeb http:/ /security.ubuntu.com/ubuntu trusty-security main restricteddeb-src http://security.ubuntu.com/ubuntu trusty-security main restricteddeb Http://security.ubuntu.com/ubuntu trusty-security universedeb-src Http://security.ubuntu.com/ubuntu Trusty-security universedeb http://security.ubuntu.com/ubuntu trusty-security multiversedeb-src/http Security.ubuntu.com/ubuntu trusty-security Multiverse

Then save exit and execute the following command update:

apt-get update

After the update is complete, execute the command again:

apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev python-dev

Finally execute the command to install Pillow:

pip install pillow

Python Error installing pillow (Ubuntu)

Related Article

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.