(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

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

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

How to Display an Image as Grayscale in Python Matplotlib?

How to Display an Image as Grayscale in Python Matplotlib? You can convert a given image to a grayscale image using four simple steps: Import the PIL and Matplotlib libraries Open the image with PIL.Image.open(filename). Convert the opened image to grayscale using img.convert(“L”) with greyscale mode “L”. Display the image using Matplotlib’s plt.imshow(gray_img, cmap=’gray’) function. … Read more