Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to Install Face Recognition in Python on Linux?

  • Last Updated : 16 Oct, 2021

In this article, we will learn how to install Face Recognition in Python on Linux. This package is used to recognize and manipulate faces from Python or from the command line with the world’s simplest face recognition library.

Installing Face Recognition Package on Linux:

Method 1: Using pip to install Face Recognition Package

Follow the below steps to install the Face Recognition package on Linux using pip:

Step 1: Install the latest Python3 in Linux

Step 2: Check if pip3 and python3 are correctly installed.

python3 --version
pip3 --version

checking python and pip version in Linux



Step 3: Upgrade your pip to avoid errors during installation.

pip3 install --upgrade pip

upgrading pip in Linux

Step 4: Enter the following command to install Face Recognition using pip3.

pip3 install face-recognition

installing Face Recognition package on Linux using pip

Method 2: Using setup.py to install Face Recognition

Follow the below steps to install the Face Recognition package on Linux using the setup.py file:

Step 1: Download the latest source package of Face Recognition for python3 from here.

curl https://files.pythonhosted.org/packages/92/aa/fd00864e0bab93d084879bf149cb25d87850887199f0f1bebd16f926f3dc/face_recognition-0.1.11.tar.gz > face_recognition.tar.gz

downloading the source package for Face Recognition in Linux

Step 2: Extract the downloaded package using the following command.

tar -xvzf face_recognition.tar.gz

extracting the face_recognition.tar.gz file in Linux

Step 3: Go inside the folder and Enter the following command to install the package.

cd face_recognition-0.1.11
python3 setup.py install

installing Face Recognition on Linux using the setup.py file

Verifying Face Recognition installation on Linux:

Make the following import in your python terminal to verify if the installation has been done properly:

import face_recognition

Verifying Face Recognition installation on Linux

If there is any error while importing the module then is not installed properly.

My Personal Notes arrow_drop_up
Recommended Articles
Page :