Python Forum
Questions about installing Pillow
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions about installing Pillow
#1
Operating System: Windows 10
Environment: Command Prompt

Hello, I am working on a project in GIMP that I want to install a photo editing python script for. This script requires that I install Pillow. I have a couple of questions:

1. I ran the installation code suggested at https://pillow.readthedocs.io/en/latest/...stallation which after changing python3 to py is as follows:

> py -m pip install --upgrade pip
> py -m pip install --upgrade Pillow

Does my current working directory in the command prompt matter when I run the above code? Or will pip automatically install it in the correct location?

2. After running the above code and confirming that it was installed with:

> py -m PIL --version

I read on the website (https://pillow.readthedocs.io/en/latest/...-libraries) that Pillow requires other libraries in order to function properly. I tried running the following commands to verify installation:

> py -m zlib --version
> py -m libjpeg --version

And in both cases I got the following response, with the library name changing as appropriate:

> D:\Users\Benjamin\AppData\Local\Programs\Python\Python39\python.exe: No module named libjpeg

How do I go about installing these libraries? I tried using the following command and got an error:

> py -m pip install --upgrade zlib

ERROR: Could not find a version that satisfies the requirement libjpeg
ERROR: No matching distribution found for libjpeg


A quick search shows that if these libraries were lacking, Pillow shouldn't have installed; so are these libraries already installed? If so, how can I verify they are? Thank you.
Reply
#2
(Jan-02-2021, 09:32 PM)Coggleton Wrote: A quick search shows that if these libraries were lacking, Pillow shouldn't have installed; so are these libraries already installed?
These external are installed bye defaut,you can test .jpg image and you see that libjpeg work.
from PIL import Image

im = Image.open("bike.jpg")
im.rotate(45).show()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing Pillow from remote archive in Linux Flatpak ChrisOfBristol 6 1,440 Sep-23-2022, 07:48 PM
Last Post: ChrisOfBristol
  Discord bot that asks questions and based on response answers or asks more questions absinthium 1 38,560 Nov-25-2017, 06:21 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020