Pillow
- Pillow is a standard library for manipulating images in Python. Unlike the math library and others we have used, Pillow is not part of the basic Python install; you have to add it yourself.
- How to install Pillow depends upon your laptop operating system.
- If you are running MacOS, open a Terminal window (Applications → Utilities → Terminal). Enter the below commands in the Terminal window
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
- If you are running Microsoft Windows, press
Windows+x
then selectCommand
prompt
(if you do not seeCommand
Prompt
selectPower
Shell
. In the window that opens, enter the the below commands.
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
- If that does not initially work, try getting rid of the 3's in both lines (ie, change to "python -m...")
- This is the way most developers may download a new python library to their machine. The TA's will walk us through a different way to download, in that we must be using PyCharm.
- If you are running Microsoft Windows and the above does not work, download and install
Test whether Pillow has been installed
- Download and run test-pillow.py
- A scary popup should appear