How To Install python3-pil on Ubuntu 20.04

In this tutorial we learn how to install python3-pil on Ubuntu 20.04. python3-pil is Python Imaging Library (Python3) Python Imaging Library (Python3)

Introduction

In this tutorial we learn how to install python3-pil on Ubuntu 20.04.

What is python3-pil

python3-pil is:

The Python Imaging Library (PIL) adds an image object to your Python interpreter. You can load images from a variety of file formats, and apply a rich set of image operations to them.

Image Objects: o Bilevel, greyscale, palette, true colour (RGB), true colour with transparency (RGBA). o colour separation (CMYK). o Copy, cut, paste operations. o Flip, transpose, resize, rotate, and arbitrary affine transforms. o Transparency operations. o Channel and point operations. o Colour transforms, including matrix operations. o Image enhancement, including convolution filters.

File Formats: o Full (Open/Load/Save): BMP, EPS (with ghostscript), GIF, IM, JPEG, MSP, PDF, PNG, PPM, TIFF, XBM. o Read only (Open/Load): ARG, CUR, DCX, FLI, FPX, GBR, GD, ICO, IMT, IPTC, MCIDAS, MPEG, PhotoCD, PCX, PIXAR, PSD, TGA, SGI, SUN, TGA, WMF, XPM. o Save only: PDF, EPS (without ghostscript). Task: ubuntu-desktop-minimal, ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop

Package: python3-pil Architecture: amd64 Version: 7.0.0-4build1 Multi-Arch: same Priority: optional Section: python Source: pillow Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Matthias Klose [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1523 Provides: python3-pillow Depends: python3 (« 3.9), python3 (>= 3.8~), python3:any, mime-support | python3-pil.imagetk, libc6 (>= 2.14), libfreetype6 (>= 2.9.1), libimagequant0 (>= 2.11.10), libjpeg8 (>= 8c), liblcms2-2 (>= 2.2+git20110628), libtiff5 (>= 4.0.3), libwebp6 (>= 0.5.1), libwebpdemux2 (>= 0.5.1), libwebpmux3 (>= 0.6.1-2), zlib1g (>= 1:1.1.4) Recommends: python3-olefile Suggests: python-pil-doc, python3-pil-dbg Conflicts: python3-imaging (« 1.1.7+2.0.0-1.1) Breaks: python3-imaging (« 1.1.7+2.0.0-1.1) Replaces: python3-imaging (« 1.1.7+2.0.0-1.1) Filename: pool/main/p/pillow/python3-pil_7.0.0-4build1_amd64.deb Size: 360896 MD5sum: ef7b156f2d15c5f16e21af6c24388298 SHA1: 45c3066455f1f2a189f75c30e5a6b35b5e8013de SHA256: de177a70da5111d1ba4105662e6ce16991a75483de78b25016898df6f6369bd0 Homepage: http://python-pillow.github.io/ Description-en: Python Imaging Library (Python3) The Python Imaging Library (PIL) adds an image object to your Python interpreter. You can load images from a variety of file formats, and apply a rich set of image operations to them.

Image Objects: o Bilevel, greyscale, palette, true colour (RGB), true colour with transparency (RGBA). o colour separation (CMYK). o Copy, cut, paste operations. o Flip, transpose, resize, rotate, and arbitrary affine transforms. o Transparency operations. o Channel and point operations. o Colour transforms, including matrix operations. o Image enhancement, including convolution filters.

File Formats: o Full (Open/Load/Save): BMP, EPS (with ghostscript), GIF, IM, JPEG, MSP, PDF, PNG, PPM, TIFF, XBM. o Read only (Open/Load): ARG, CUR, DCX, FLI, FPX, GBR, GD, ICO, IMT, IPTC, MCIDAS, MPEG, PhotoCD, PCX, PIXAR, PSD, TGA, SGI, SUN, TGA, WMF, XPM. o Save only: PDF, EPS (without ghostscript). Task: ubuntu-desktop-minimal, ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop

There are three methods to install python3-pil on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-pil Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python3-pil using apt-get by running the following command:

sudo apt-get -y install python3-pil

Install python3-pil Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python3-pil using apt by running the following command:

sudo apt -y install python3-pil

Install python3-pil Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python3-pil using aptitude by running the following command:

sudo aptitude -y install python3-pil

How To Uninstall python3-pil on Ubuntu 20.04

To uninstall only the python3-pil package we can use the following command:

sudo apt-get remove python3-pil

Uninstall python3-pil And Its Dependencies

To uninstall python3-pil and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove python3-pil

Remove python3-pil Configurations and Data

To remove python3-pil configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge python3-pil

Remove python3-pil configuration, data, and all of its dependencies

We can use the following command to remove python3-pil configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python3-pil

References

Summary

In this tutorial we learn how to install python3-pil package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.