5 Easy Ways to Download an Image from a URL in Python

Problem Formulation and Solution Overview In this article, you’ll learn how to download an image from the web in Python. To make it more fun, we have the following running scenario: Sven, a Journalist from Greeland, is writing about Glacier Calving. His editor would like photos of iceberg collapses in the area accompanying his article. … Read more

Creating an Advent Calendar App in Python with AI Image Creation

This blog describes a fun mini Python project using AI image creation for creating artwork for an advent calendar implemented using PyGame. Context It’s December 1st, and my daughter has just opened the first door on her physical advent calendar, counting down the days of the festival of general consumerism that some people call Christmas. … Read more

(Fixed) ModuleNotFoundError: No Module Named ‘face_recognition’ in Python

Quick Fix: Python raises the ImportError: No module named ‘face_recognition’ when it cannot find the library face-recognition. It occurs if you haven’t installed face-recognition explicitly with pip install face-recognition, or you have different Python versions on your computer, and face-recognition is not installed for the particular version you’re using. You also need to pip install … Read more

ModuleNotFoundError: No Module Named ‘imutils’ | Python

Quick Fix: Python raises the ImportError: No module named ‘imutils’ when it cannot find the library imutils. The most frequent source of this error is that you haven’t installed imutils explicitly with pip install imutils. Alternatively, you may have different Python versions on your computer, and imutils is not installed for the particular version you’re … Read more

How to Convert an Image from RGB to Grayscale in Python

Problem Formulation and Solution Overview In this article, you’ll learn how to convert an image from RGB to Grayscale. Aaron, an Icelandic Photographer, has a beautiful picture of their famous Elephant Rock. He needs to convert this picture from an RGB to Grayscale representation and has asked for your assistance. πŸ’‘Note: To follow along, right-click … Read more

How to Show Images in Python

Showing pictures in Python This post will show different ways of displaying pictures in Python. The options we will explore are: PIL (Python Image Library) OpenCV (Computer Vision Library) IPython Matplotlib Library Method 1: PIL (Python Image Library) PIL is the standard library to manage images in Python. They discontinued the project in 2011, but … Read more