Setup.py error when installing dlib on Windows 10 [PYTHON] - python

Whenever I try to install dlib using pip install dlib or pip3 install dlib, I get the following error message error
I have already downloaded cmake and cv2, and I have also added cmake bin to the environment variables, I am not sure what else I could do to get this working. My main point downloading dlib is to be able to use the face_recognition library.

Follow the article on the https://www.geeksforgeeks.org/how-to-install-dlib-library-for-python-in-windows-10/
Install CMake from its official website and make sure choose the right version according to your system configuration.
While installing CMake select Add CMake to the system PATH to avoid any error in the next steps.
Install the c++ compiler of the visual studio code community version.
Install cmake library pip install cmake.
Install dlib library pip install dlib.

Related

Unable to install dlib module

While installing dlib module, all the subprocesses are killed and showing that legacy error.
The same error is faced when face-recognition is installed.
I tried to do this with github repositry files.But also it is not working for both of the module.
I want to know how to install successfully both the modules in python 3.11.1 version on windows 10 laptop
From https://www.geeksforgeeks.org/how-to-install-dlib-library-for-python-in-windows-10/ :
Install Cmake from https://cmake.org/download/ (Add to PATH)
Install the c++ compiler of the visual studio code community version. For that go to the visual studio code official website https://visualstudio.microsoft.com/visual-cpp-build-tools/
Then pip install cmake and dlib

Can't install face_recognition

I am trying to install face_recognition with pip install face_recognition but any time I do that it gives me this output: https://pastebin.com/LJ3XRdSq
Does anyone know a fix for this?
You have to install cmake and dlib:
On the face_recognition github page:
Installing on Mac or Linux
First, make sure you have dlib already installed with Python bindings.
Then, make sure you have cmake installed:
So run these:
pip install cmake
pip install dlib
Before you install face_recognition:
pip install face_recognition
If you're getting an error while installing dlib look at this answer.
Also watch this video: https://www.youtube.com/watch?v=jjRFCTmK2SY

An error occurred while installing face_recognition Error text: Collecting face_recognition

I want to start face recognition project on python. i installed bython and install pipenv. after this when I install " pipenv install face_recognition" shell give me a error after some installation.
(mrblack--PGk31eo) C:\Users\mrblack>
pipenv install face_recognition
Installing face_recognition…
Error: An error occurred while installing face_recognition!
Error text: Collecting face_recognition
RuntimeError: CMake must be installed to build the following extensions:_dlib_pybind11
Installation Failed
From http://dlib.net/compile.html :
Note that you need to have CMake and a working C++ compiler installed for this to work.
(Emphasize mine — phd)
Install CMake from https://cmake.org/download/ or https://pypi.org/project/cmake/. Try pip install cmake
For installing face-recognition module for Ubuntu 18.04: (Try for other OS, I used this for 18.04)
Install cmake: pip install cmake
After cmake is successfully installed
Optional: Install git if you don't have git
git clone https://github.com/davisking/dlib.git
build the main dlib library
cd dlib mkdir build; cd build; cmake ..; cmake --build .
Build and install python essentials
cd .. python3 setup.py install
After all this run these to verify
python3
import dlib
Now install face_recognition
pip3 install face_recognition
Takes some time but that is okay! I hope it worked for you
Refer these materials:
face-recognition original repo: https://github.com/ageitgey/face_recognition#installing-on-mac-or-linux
dlib: https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
face_recognition package requires dlib and it is a very huge package and problematic in installation. I recommend you to adopt deepface package for face recognition. It is mainly based on Keras and TensorFlow. In other words, it is easy to make initial setup.
Besides, it wraps dlib and some other state-of-the-art face recognition models: VGG-Face (University of Oxford), FaceNet (Google), OpenFace (Carneige Mellon University), DeepFace (Facebook ) and DeepID (The Chienese University of Hong Kong). I recommend you to use VGG-Face or FaceNet models.
You should just pass image pairs as exact paths. BTW, you can pass base64 encoded images or direct numpy arrays as image pairs.
#!pip install deepface
from deepface import DeepFace
models = ['VGG-Face', 'Facenet', 'OpenFace', 'DeepFace', 'DeepID']
result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = models[0])
print(result["verified"])
Result object stores the found distance and required distance threshold to verify an image pair.
I was getting the same error when I tried it. I resolved it by degrading to python3.7.
So follow these steps :
degrade or upgrade to python3.7
pip3 install CMake
pip3 install face-recognition
these steps will resolve the error but after that when I was using the library in my code it was again giving an error related to algorithmia.
So I resolved it by downloading visual studio 2017
Hope it was helpful,
Thanks
I had the same error this worked for me:
You have to install make and dlib before installing face recognition.
pip3 install cmake
pip3 install dlib
pip3 install face-recognition
If this doesn't work you could use Visual Studio Code as idle.

Failed building wheel for Twisted in Windows 10 python 3

I'm trying to install rasa-core on my windows 10 machine.
When installing with pip install, I get: Failed building wheel for Twisted
The same error appears when trying to install Twisted separately.
How could I solve this problem?
Download the .whl file from Unofficial Windows Binaries for Python Extension Packages
then after you are in the virtualenv
pip install C:\...yourpath...\Downlaods\<filename>
e.g.
pip install C:\...yourpath...\Downlaods\Twisted‑20.3.0‑cp38‑cp38‑win_amd64.whl
This worked for me..
Download Twister package from releases and install it eg.
pip install C:\...yourpath...\Downlaods\Twisted‑20.3.0‑cp38‑cp38‑win_amd64.whl
Install Twisted Using pip
Or Download https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted at this location
pip install Twisted-18.9.0-cp27-cp27m-win_amd64.whl
No conda install or Microsoft Studio.
Follow:
Download Twisted : https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
In CMD: cd C:\Users\USERNAME\Downloads
pip install Twisted-version.whl
If you don't already have Microsoft Visual C++ installed do so from the following link. Make sure you match the correct version for the Python you have installed.
https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.0_standalone:_Build_Tools_for_Visual_Studio_2017_.28x86.2C_x64.2C_ARM.2C_ARM64.29
Then install Twisted with: pip install Twisted[windows_platform]
Ensure you have [windows_platform] included.

Djanjo dlib integration - pip install dlib have errors on macos 10.13.1

I am trying to install dlib library for my django project on my mac (macos 10.13.1), however i have this failure. I am using pip install dlib
below is the full execution with error
https://gist.github.com/axilaris/af361e54bd78a11fc35fc5029de69caa
Maybe you need to install Boost before trying to install the dlib library.
The simplest way is to download MacPorts, and run the following command:
sudo port install boost
I edited my post because I think I provided the wrong link.

Categories