How to resolve ERROR: Could not find a version that satisfies the requirement PIL (from versions: none) or ERROR: No matching distribution found for PIL when trying to execute python script with PIL included
In this post, I will demonstrate how to resolve the following error when executing a Python script with PIL included:
The core error message is:
2. The environment
This is the python environment in my laptop:
You can see that I am using python 3.7
3. The solution
The reason for this problem is:
Pillow has now been used instead of PIL
The most python version supported by PIL is 2.7,
And pillow version greater than 2.1 supports python2.6, 2.7 and 3.x,
The corresponding original import image is also replaced by from PIL import Image, pay attention to case.
So the solution is installing pillow instead of intalling PIL:
4. Summary
In this post, I demonstrated how to solve the ERROR: Could not find a version that satisfies the requirement PIL (from versions: none) or ERROR: No matching distribution found for PIL when trying to execute python script with PIL included. The key point is the ‘PIL’ library is replaced by ‘pillow’ library, we should use the latter to process images.
Final Words + More Resources
My intention with this article was to help others who might be considering solving such a problem.
So I hope that’s been the case here. If you still have any questions, don’t hesitate to ask me by
email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope: