Additional preparation

In this section, we will take care of a bit more housekeeping that is required before we can successfully run the project.

Pillow is a Python Imaging Library (PIL), which provides support for opening, manipulating, and saving images. The current version identifies and reads a large number of formats. 

This project utilizes pillow and requires at least version 5.3.0 to be installed. To ensure that the notebook uses this version, we need to run the following commands:

# --- we need pillow version of 5.3.0 to run this project
# --- this code will uninstall the current version:
!pip uninstall -y Pillow
# --- install the 5.3.0 version
!pip install Pillow==5.3.0
# --- import the new one
import PIL
# --- Should print 5.3.0. If it doesn't, then restart the kernel
print(PIL.PILLOW_VERSION)

The code uninstalls the currently installed version of Pillow, installs version 5.3.0, imports it into the project, and then prints the (now) currently installed version.

As the final line of code indicates, if the output of the print command does not indicate that the pillow version installed is 5.3.0, you will need to stop and then restart your kernel (click on Kernel, then restart within your notebook), then again execute the print command, and you should be ready to go:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset