Open VISHAL1003MAX opened 8 months ago
In Pycharm click on File => Settings => Expand Project: YourProject, click on Python Interpreter. This should show all packages that are installed for this project (such as cv2, numpy, face-recognition, face_recognition_models, etc.). If you don't see them, click on the + symbol in the upper left corner of the Python Packages tool window and add all the packages you need for your project. If the packages are all there and you are still getting the error, try installing the package "setuptools" in addition to the other packages. This is what worked for me.
I cant anymore, reinstalled and restarted everthing like 10 times now.
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> python test_script.py
**Please install face_recognition_models
with this command before using face_recognition
:
pip install git+https://github.com/ageitgey/face_recognition_models
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> pip install git+https://github.com/ageitgey/face_recognition_models
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/ageitgey/face_recognition_models
Cloning https://github.com/ageitgey/face_recognition_models to c:\users\lenna\appdata\local\temp\pip-req-build-9enqmvh_
Running command git clone --filter=blob:none --quiet https://github.com/ageitgey/face_recognition_models 'C:\Users\lenna\AppData\Local\Temp\pip-req-build-9enqmvh_'
Resolved https://github.com/ageitgey/face_recognition_models to commit e67de717267507d1e9246de95692eb8be736ab61
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> pip install face_recognition
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: face_recognition in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (1.3.0)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (0.3.0)
Requirement already satisfied: Click>=6.0 in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (8.1.7)
Requirement already satisfied: dlib>=19.7 in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (19.24.4)
Requirement already satisfied: numpy in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (1.26.4)
Requirement already satisfied: Pillow in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (10.3.0)
Requirement already satisfied: colorama in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from Click>=6.0->face_recognition) (0.4.6)
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> python test_script.py
Please install face_recognition_models
with this command before using face_recognition
:
pip install git+https://github.com/ageitgey/face_recognition_models**
Edit 15/05/2024: I got it now, make sure have installed cmake via pip, or check if the env var is set right...
which environment variable I am having same issue
(venv) ubuntu@ip-172-31-19-12:/var/digidocs$ sudo venv/bin/pip3 install git+https://github.com/ageitgey/face_recognition_models
Collecting git+https://github.com/ageitgey/face_recognition_models
Cloning https://github.com/ageitgey/face_recognition_models to /tmp/pip-req-build-1iv0i0kb
Running command git clone --filter=blob:none --quiet https://github.com/ageitgey/face_recognition_models /tmp/pip-req-build-1iv0i0kb
Resolved https://github.com/ageitgey/face_recognition_models to commit e67de717267507d1e9246de95692eb8be736ab61
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
(venv) ubuntu@ip-172-31-19-12:/var/digidocs$ sudo venv/bin/python3 main.py
Please install `face_recognition_models` with this command before using `face_recognition`:
pip install git+https://github.com/ageitgey/face_recognition_models
(venv) ubuntu@ip-172-31-19-12:/var/digidocs$
I had the same issue. First, I tried to install the face_recognition_models, but it was already installed. Then I fixed accessing the facerecognition lib which imports the models: .venv\Lib\site-packages\facerecognition\api.py
I printed the Exception to see the real error:
try:
import face_recognition_models
except Exception as e:
print(e)
print("Please install `face_recognition_models` with this command before using `face_recognition`:\n")
print("pip install git+https://github.com/ageitgey/face_recognition_models")
quit()
Here is the error message:
No module named 'pkg_resources'
Please install `face_recognition_models` with this command before using `face_recognition`:
pip install git+https://github.com/ageitgey/face_recognition_models
In the end, I just updated the setuptools and it worked for me:
pip install --upgrade setuptools
Description
I am unable to install face_recognition_model. If anybody knows please help me . ![Uploading IMG20240102161322.jpg…]()