How to Install Face Recognition in Python on Linux?
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 2: Check if pip3 and python3 are correctly installed.
python3 --version pip3 --version
Step 3: Upgrade your pip to avoid errors during installation.
pip3 install --upgrade pip
Step 4: Enter the following command to install Face Recognition using pip3.
pip3 install face-recognition
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
Step 2: Extract the downloaded package using the following command.
tar -xvzf face_recognition.tar.gz
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
Verifying Face Recognition installation on Linux:
Make the following import in your python terminal to verify if the installation has been done properly:
If there is any error while importing the module then is not installed properly.