sudo pip install PIL code example Example: python install pil # The new version of PIL is called Pillow, use that instead: pip install pillow