Dipesh Ghiyal
Dipesh Ghiyal

Reputation: 11

Face-recognition Library unable to install in virtual environment

I am unable to install face-recognition library virtual environment for Python properly. My Python version is 3.12 and pip version 24.0, The library gets installed, but when I try to import the library and run the program this error occurs

(exhibittrack) dipeshghiyal@192 face_recognition_flask 9 % python app.py 
Please install face_recognition_models with this command before using face_recognition: 
pip install git+https://github.com/ageitgey/face_recognition_models

error while running the program. Also, after installing face-recognition from GitHub as suggested, it shows that it is installed, but once again, when we try to run it, the same error occurs as shown in the screenshot.

This issue comes only when I am trying to install it in virtual environment, when I install it globally it simply gets install and doesn't show error showed in the image. I can also use face-recognition library by simply importing it.

Upvotes: 0

Views: 468

Answers (2)

Dipesh Ghiyal
Dipesh Ghiyal

Reputation: 11

I faced the same problem in my device(Mac), you can simple install setup tools library by pip install setuptools and then once again try to run the program this will automatically solve the installation error.

Upvotes: 1

EMRAH LEVENT ŞENER
EMRAH LEVENT ŞENER

Reputation: 1

After many times of trying finally i solved the problem. You need to install the librarys in specific versions and in a order.

pip install cmake    
pip install dlib==19.24.2    
pip install face_recognition   
pip install setuptools    
pip install numpy==1.26.4   
pip install opencv-python

Upvotes: 0

Related Questions