building wheel for dlib (setup.py) loop
Asked Answered
C

7

16

trying to install dlib and face_recognition from Ubuntu taking reference from https://www.learnopencv.com/install-dlib-on-ubuntu/ but after following commands: i am stuck at:

Building wheels for dlib, face-recognition-models
    Building wheel for dlib (setup.py) ... /(looping stick)
Chic answered 15/2, 2019 at 17:49 Comment(2)
Have a look here. According to @mshahiddev, there is a useful comment (sadly not an answer....). #56052015Mono
Have a look at my answer here @ 2020. #52332768Stephanistephania
J
29

To complement mshahiddev answer I added -vvv and it showed that it was working.

Just took a really long time to complete. I just had to wait.

pip install dlib -vvv
Jobie answered 5/6, 2020 at 0:1 Comment(0)
A
4

Memory is the issue. My AWS instance had only 1 gb space. Reading the problem intuition, I created a swap space of 6 more gb and it worked.

Now, I'm able to complete installation.

Averir answered 15/2, 2021 at 9:46 Comment(0)
T
4

In my case, I just had to wait for approx. 10 mins for that "building wheel loop" to end and then it was installed successfully! Would advise to first wait for 10-15 minutes at least, before trying other answers given above.

Totemism answered 21/2, 2021 at 6:59 Comment(2)
You are partially right, I waited for 10 min, and after that it failed to install and giving the following error. Building wheel for dlib (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for dlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [335 lines of output] running bdist_wheelQuilting
then at the end, subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Failed to build dlib ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projectsQuilting
C
3

First, you should install the following packages using terminal:

$ sudo apt-get update
$ sudo apt-get install build-essential cmake
$ sudo apt-get install libopenblas-dev liblapack-dev
$ sudo apt-get install libx11-dev libgtk-3-dev

After that:
Use pip3 for Python 3 version or pip by default:

pip3 install cmake
pip3 install dlib

It will take a while to build dlib and returns successfully installed

Cahoot answered 9/9, 2021 at 8:41 Comment(1)
Please add further details to expand on your answer, such as working code or documentation citations.Mcburney
I
2

This was posted by another user on my question for the same thing.

"Are you sure you posted the complete error log? If yes, can you run pip install face_recognition -vvv and add the output to the question?" – hoefling May 9 at 7:37

It worked! Please thank him or her.

Inarticulate answered 12/5, 2019 at 21:27 Comment(4)
Are you saying that there is a duplicate which has asked the same and was usefully answered? In that case you should flag this as a duplicate and refer to the matching question.Mono
No, my question was asked later ( my question was the duplicate, but received a good answer, unlike this post.)Inarticulate
@Inarticulate the duplicate policy doesn't require new questions to be closed as a duplicate of an old one. It usually goes by the quality of answers, which most of the time means the older one. This question could be flagged as a duplicate of your question as a resultMemorialist
But before you that can happen, your post needs to have an actual answer. If OP of the comment doesn't want to post it as an answer, you could do it yourself (just remember attribution if you copy-paste the content - see this if you don't know how)Memorialist
D
1

First of all, you should install cmake

You can use the following command:

pip install cmake

After if everything will work!

Demetrademetre answered 28/11, 2019 at 10:24 Comment(0)
J
0

I think it just takes some time, just do it with verbose and see what's going on in the background.

pip install dlib --verbose

installing process

Jasperjaspers answered 26/6 at 5:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.