How to Install PIL on MacOS?
PIL is an acronym for the python image library. It is a library that is used to manipulate images, using PIL library with python we can perform various operations on images. In this article, we are going to learn how we can install PIL on MacOS.
Method 1: Using PIP to install PIL (Pillow).
Python comes preinstalled in MacOs, and if you have not installed the pip, follow the following steps to install pip on your macOS.
Step 1: Download the get_pip python file to install pip.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Note: curl is a command-line utility that we have used to download the get-pip.py file.
Step 2: Execute the downloaded python file to install pip:
This will install the pip3 onto your system.
Step 3: Now simply run the following command to install pip(pillow) onto your MacOs:
python3 -m pip install --upgrade Pillow
Step 4: To verify the installation run the following command.
pip3 show Pillow
Pillow installed with version 8.3.2
Method 2: Using the Brew command
Simply run the following command in the terminal and it will install the PIL (pillow) onto your MacOS.
brew install pillow
Pillow installed using Brew
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!