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

4.6/5 - (7 votes)

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

Here’s the code for copy&pasting:

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

I really think not enough coders have a solid understanding of PowerShell. If this is you, feel free to check out the following tutorials on the Finxter blog.

Related Articles:

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

These you have already seen before, haven’t you?

Related Article:

How to Install Pillow on Linux?

To upgrade pip and install the Pillow library, you can use the following two commands, one after the other.

  • python3 -m pip install – upgrade pip
  • python3 -m pip install – upgrade Pillow

Here’s the code for copy&pasting:

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

Here’s the code for copy&pasting:

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 pip install Pillow command.

This is shown in the following code:

pip install Pillow

Here’s a screenshot of the two steps:

  1. Open Terminal tab in Pycharm
  2. 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 command conda install -c anaconda pillow in your shell or terminal.

Like so:

 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!

Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation.

To become more successful in coding, solve more real problems for real people. 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?

You build high-value coding skills by working on practical coding projects!

Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?

🚀 If your answer is YES!, consider becoming 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.

If you just want to learn about the freelancing opportunity, feel free to watch my free webinar “How to Build Your High-Income Skill Python” and learn how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!

More Finxter Tutorials

Learning is a continuous process and you’d be wise to never stop learning and improving throughout your life. 👑

What to learn? Your subconsciousness often knows better than your conscious mind what skills you need to reach the next level of success.

I recommend you read at least one tutorial per day (only 5 minutes per tutorial is enough) to make sure you never stop learning!

💡 If you want to make sure you don’t forget your habit, feel free to join our free email academy for weekly fresh tutorials and learning reminders in your INBOX.

Also, skim the following list of tutorials and open 3 interesting ones in a new browser tab to start your new — or continue with your existing — learning habit today! 🚀

Python Basics:

Python Dependency Management:

Python Debugging:

Fun Stuff:

Thanks for learning with Finxter!

Programmer Humor

Question: How did the programmer die in the shower? ☠️

Answer: They read the shampoo bottle instructions:
Lather. Rinse. Repeat.