How to Install Pillow for Python on Windows

If you’ve been dabbling with Python for image processing, then you’ve probably heard of the Pillow module. An offshoot of the original PIL (Python Imaging Library), Pillow offers capabilities for editing and saving images in a multitude of formats.

Installing Pillow on your Windows machine isn’t half as complicated as you might have thought. In this tutorial, we’ll navigate you through the process in just a few simple steps. Let’s get started!

Step 1: Check Your Python Environment

Before we start with the actual installation, it’s critical to ensure that you have the latest version of Python installed in your Windows system. To do this, open your Command Prompt and type:

If Python is up-to-date and correctly installed, you should see a version number displayed. If not, please download and install the most recent version of Python and proceed further.

Step 2: Installing Pillow

Once you’ve made sure that Python has been successfully set up, the next step is to get the Pillow module installed using pip, the Python package installer. Open Command Prompt and input the following command:

This should download and install Pillow for you. If pip isn’t recognized, it indicates a problem with your Python installation and you should refer back to Step 1.

Step 3: Verify Installation

After you install the module, it would be wise to verify its installation as well. Open Command Prompt, type python, then type:

If it runs without throwing an error, voila! You’ve successfully installed Pillow on your system.

Python Environment Check
python --version

Installing Pillow
pip install pillow

Verifying Installation
from PIL import Image

Conclusion

Congrats, you’ve successfully installed Pillow on your Windows system and now can embark on your image processing projects using Python with much more ease and efficiency. Remember, if you ever get stuck anywhere with Pillow, its comprehensive documentation is just a click away.