How to Install PIL/Pillow in Python? A Helpful Illustrated Guide

PIL is an abbreviation of Python Imaging Library and it adds image processing to Python. In 2011, PIL has been discontinued—its unofficial successor framework Pillow for image processing is an actively maintained and user-friendly alternative for Python 3.

Install Pillow Command Line Windows
pip install Pillow

Let’s dive into the installation guides for the different operating systems and environments!

How to Install Pillow on Windows?

To install the updated Pillow framework on your Windows machine, run the following code in your command line or Powershell:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow

How to Install Pillow on Mac?

Open Terminal (Applications/Terminal) and run:

  • xcode-select -install (You will be prompted to install the Xcode Command Line Tools)
  • sudo easy_install pip
  • sudo pip install pillow
  • pip install pillow

As an alternative, you can also run the following two commands to update pip and install the Pillow library:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow

How to Install Pillow on Linux?

Upgrade pip and install the Pillow library using the following two commands, one after the other:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow

How to Install Pillow on Ubuntu?

Upgrade pip and install the Pillow library using the following two commands, one after the other:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow

How to Install Pillow in PyCharm?

The simplest way to install Pillow in PyCharm is to open the terminal tab and run the following command:

pip install Pillow

Here’s a screenshot with the two steps:

  • Open Terminal tab in Pycharm
  • Run pip install Pillow in the terminal to install Pillow in a virtual environment.
Install Pillow

As an alternative, you can also search for Pillow in the package manager. However, this is usually an inferior way to install packages because it involves more steps.

How to Install Pillow in Anaconda?

You can install the Pillow package with Conda using the following command in your shell:

 conda install -c anaconda pillow 

This assumes you’ve already installed conda on your computer. If you haven’t check out the installation steps on the official page.

Where to Go From Here?

Enough theory, let’s get some practice!

To become successful in coding, you need to get out there and solve real problems for real people. That’s how you can become a six-figure earner easily. And that’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

Practice projects is how you sharpen your saw in coding!

Do you want to become a code master by focusing on practical code projects that actually earn you money and solve problems for people?

Then become a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

Join my free webinar “How to Build Your High-Income Skill Python” and watch how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!

Author: admin

Leave a Reply

Your email address will not be published.