• 카테고리

    질문 & 답변
  • 세부 분야

    컴퓨터 비전

  • 해결 여부

    미해결

안녕하세요 질문 있습니다.

20.03.15 18:09 작성 조회수 5.43k

0

dlib을 설치하는데 계속 이런 에러가 떠서 찾아보고 해봤는데 계속 안되는데 왜 그런지 알려주실 수 있을까요..

(ComputerVision) usang-in-ui-MacBook-Pro:~ usang-in$ pip3 install dlib

Collecting dlib

  Using cached https://files.pythonhosted.org/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz

Building wheels for collected packages: dlib

  Running setup.py bdist_wheel for dlib ... error

  Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-wheel-ecxo61rx --python-tag cp36:

  running bdist_wheel

  running build

  running build_py

  package init file 'dlib/__init__.py' not found (or not a regular file)

  running build_ext

  Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

  Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

  -- The C compiler identification is unknown

  -- The CXX compiler identification is unknown

  -- Check for working C compiler: /usr/bin/cc

  -- Check for working C compiler: /usr/bin/cc -- broken

  CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

    The C compiler

  

      "/usr/bin/cc"

  

    is not able to compile a simple test program.

  

    It fails with the following output:

  

      Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

  

      Run Build Command(s):/usr/bin/make cmTC_475b6/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  

  

  

  

  

    CMake will not be able to correctly generate this project.

  Call Stack (most recent call first):

    CMakeLists.txt:3 (project)

  

  

  -- Configuring incomplete, errors occurred!

  See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

  See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 261, in <module>

      'Topic :: Software Development',

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

      return distutils.core.setup(**attrs)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

      dist.run_commands()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

      self.run_command(cmd)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run

      self.run_command('build')

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

      self.run_command(cmd_name)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 135, in run

      self.build_extension(ext)

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 172, in build_extension

      subprocess.check_call(cmake_setup, cwd=build_folder)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

  

  ----------------------------------------

  Failed building wheel for dlib

  Running setup.py clean for dlib

Failed to build dlib

Installing collected packages: dlib

  Running setup.py install for dlib ... error

    Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-m5vnrry6/install-record.txt --single-version-externally-managed --compile:

    running install

    running build

    running build_py

    package init file 'dlib/__init__.py' not found (or not a regular file)

    running build_ext

    Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

    Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

    -- The C compiler identification is unknown

    -- The CXX compiler identification is unknown

    -- Check for working C compiler: /usr/bin/cc

    -- Check for working C compiler: /usr/bin/cc -- broken

    CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

      The C compiler

    

        "/usr/bin/cc"

    

      is not able to compile a simple test program.

    

      It fails with the following output:

    

        Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

    

        Run Build Command(s):/usr/bin/make cmTC_0561c/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    

    

    

    

    

      CMake will not be able to correctly generate this project.

    Call Stack (most recent call first):

      CMakeLists.txt:3 (project)

    

    

    -- Configuring incomplete, errors occurred!

    See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

    See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 261, in <module>

        'Topic :: Software Development',

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

        return distutils.core.setup(**attrs)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

        dist.run_commands()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run

        self.run_command('build')

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

        self.run_command(cmd_name)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 135, in run

        self.build_extension(ext)

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py", line 172, in build_extension

        subprocess.check_call(cmake_setup, cwd=build_folder)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

    

    ----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-m5vnrry6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-trs12u8b/dlib/

You are using pip version 10.0.1, however version 20.0.2 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

답변 19

·

답변을 작성해보세요.

1

안녕하세요?

일단 오랜 시간과 노력 끝에 해결하셨다니 정말 축하드립니다.

해결과정이 힘들고 노력과 시간이 많이들엇지만 그 만큼 실력이 늘었을 겁니다.

다른강의도 들어주신다니 너무 감사하고 과정을 고르시는데 도움이되시도록

참고로 관련이 되는 제 강의 몇가지를 소개해 드릴테니 필요한 강의를 들으세요.

'라즈베리파이IoT 딥러닝 Computer Vision 실전 프로젝트'과정은 재미있는 프로젝트 다섯가지를

제한된 라즈베리파이IoT장비에서 맞게 최적화하고 실행해 보는 과정입니다. 라즈베리파이의 제약이 많아서 고생도 많이 했지만 의미가 있었던 도전과제입니다. 사물인터넷 관련 프로젝트를 고민하시면 추천드립니다.  

최근에는 '모바일 딥러닝 Computer Vision 실전 프로젝트'과정을 출시했습니다.

주로 파이썬 PC에서 머신러닝을 배우면서 제 스스로 가지고 있던 '그래서 모바일에는 어떻게 서비스하라는 거지?'라는 질문에 답을 만든 과정이라고 할까요? 모바일 서비스를 생각하시면 실용적인 내용이 많습니다.

그리고 그간 지식과 경험을 모아서 와디즈 펀딩 '머신러닝, 딥러닝 Computer Vison 전문가로 만들어 드립니다.'과정을 준비하고 있어요. 3월 31일까지인데 이미 펀딩은 오픈 49시간만에 성공해서 현재 271%를 넘었고 전자책형태로 만드는 시도를 하고 있어요. 온라인 강의가 장점이 많은 반면 필요한 내용을 참조하는데 전자책이 좋을 것 같아 이걸 융합하는 일을 하느라 제가 지금 무척 고생하고 있지만 보람도 클것 같아요. 

또, 이 강의의 후속인 '[OpenCV] 파이썬 딥러닝 영상처리 프로젝트 2 - 불량사과를 찾아라!'를 기획하고 있는데

여기서는 YOLO모델을 직접 학습해서 표준으로 제공하는 80개 물체 뿐 아니라 제가 학습시킨 불량사과를  식별하는 custom weight를 만들 계획입니다. 

그리고 케라스 학습모델을 사용하는 것과 YOLO를 쓰는 것을 비교도 할 계획이고요.

이외에도 물체의 크기와 거리를 측정하고 따라서 추적하고 움직이는 기능도 포함할 예정이예요.

이런 내용을 구상하는 것은  향후에 '로봇IoT 딥러닝 Computer Vision실전 프로젝트'라는 과정을 생각하고 있어서 입니다. 그 과정에서는 불량사과를 찾는데 그치는 것이 아니라 로봇 팔이 사과를 보고 불량이면 오른쪽, 정상이면 왼쪽, 크기가 큰 특급상품이면 앞으로 가져다 두는 프로젝트와 강화학습, GAN을 응용한 다른 로봇 딥러닝 프로젝트들을 만드려고 해요.

저는 가능한 강의를 필요한 목적에 맞게 필요한 내용으로 모듈화 하려노력합니다. 수강생 분들이 필요한 부분만 골라서 듣고 시간과 비용을 절약하게 해드리려는 생각입니다. 그런데 가끔은 어떤 내용을 들을지 궁금해 하시는 분들이 있고 여러 강의를 구매하시는데 불편이 있으신 분들도 계셔서 고민하다 제 크리애플 사이트에 20개가 넘는 모든 강의를 월, 년 구독 개념으로 들으실 수 있도록 해뒀습니다.

주변에도 많이 알려주시고 내용이 좋았다면 좋은 후기도 남겨주세요. 개선점이 있다면 언제나 알려주시고요.

강의에서 많은 것 얻으시길 바랍니다.

감사합니다.  

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.28

conda-forge 가 오래 걸리긴 했어도 그 명령어로 설치를 한것 같습니다. 친절한 답변 감사합니다. 다른 강의도 신청할게요 너무 재밌네요 ㅋ

0

안녕하세요?

일단 dlib설치를 축하합니다. 마지막 conda-forge 명령으로 설치하신건가요?

어떻게 성공했는지 알려주시면 강의에 보완하도록 하겠습니다.

그리고 아주 중요한 내용인데 가상환경은 일부러 별도의 snabox놀이터를 만든 개념으로

여기에 설치한 내용은 외부에서 사용할 수 없고 반대로 외부에 설치한 내용도 가상환경에서 사용할 수 없습니다.

혹시 따로 설치하신다면 가상환경에서  pip3 install face_recognition을 실행해주세요.

감사합니다.

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.17

pip3 install face_recognition 하게 되면 저런 에러가 계속 뜨는데 setup.py 를 어떠한 경로에 넣어야 할까요..

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.17

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.17

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.17

 

dlib은 설치가 된 것 같은데 face_recognition이 또 설치가 안되네요 ㅠ 

혹시 face_recognition도 따로 설치하는 방법이 있을까요..

그리고 하나만 더 질문 드릴게요..

가상환경에서 설치하는 것들이 그 가상환경에 나가면 실행이 안되는 건가요..

귀찮게 해서 죄송합니다. ㅠ

0

안녕하세요?

이전 시도들로 정상적으로 작동해야하는데 설치가 안되니 아나콘다의 dependency충돌이 의심스럽내요.

이번에는  conda-forge를 이용해서 Dlib package를 설치해 보지요.


conda install -c conda-forge dlib

이 명령으로 해결하신 분이 있다니 다시한번 시도해 보고 알려주세요.

감사합니다.

Conda-forge has made sure to resolve all the dependency conflicts, so I had no issues with the installation. They have pre-built binaries for Windows, Linux, and Mac OS, and Python 2.7 through 3.8. The current package (at the time of this writing) is based on Dlib v19.19.

jieun.kim46님의 프로필

jieun.kim46

2024.01.24

휴휴 저도 이 명령어로 겨우 설치한것 같습니다

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.17

그리고 새로운 가상환경에서  설치해도 똑같은 상황이 발생하는데 제가 잘 모르고 설치 하는건지 모르겠네요 ㅠ 

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.16

아아 저 캡쳐에는 없지만 저 부분은 이미 깃 클론 후  터미널을 종료후에 다시 킨 거라서 폴더가 있는 상태입니다!

0

안녕하세요?

이렇게 정상적으로 되어야하는데 안되면 정말 답답하시죠?

그런데 실행하신 로그를 살펴보니 아래 dlib의 소스코드를 다운로드하는 부분이 없는 것 같은데요.

git clone https://github.com/davisking/dlib.git

혹시 이 소스코드를 다운로드 받지 않고 cmake를 하신 것은 아닌지 궁금합니다.

axjp1fr0/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib Check the logs for full command output.

(py36) usang-in-ui-MacBook-Pro:~ usang-in$ cd dlib

(py36) usang-in-ui-MacBook-Pro:dlib usang-in$ cd build.....

마음데로 잘 안되서 힘드시겠지만 다시 한번 힘내서 아래 절차대로 해볼까요?

$ git clone https://github.com/davisking/dlib.git
$ cd dlib
$ mkdir build
$ cd build
$ cmake .. -DUSE_AVX_INSTRUCTIONS=1
$ cmake --build .
$ cd ..
$ python setup.py install --yes USE_AVX_INSTRUCTIONS

 

만약 그래도 안되면 새로운 가상환경을 만드는 것도 시도할 수 있을 것 같습니다.

좋은 결과 있으시길 바라고 만약 안되면 언제나 연락주셔도 됩니다.

저도 즉시 답변을 못드리는 상황이 있을 수는 있으나 제 힘이 닿는데까지는 돕겠습니다.

감사합니다.

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.16

아흑 계속 질문드려 죄송합니다. 파이썬 다시 지우고 3버전으로 깐 후에 다 해봤는데 계속 밑에 에러가 뜨네요.. ㅠㅠ 포기해야 할까요..  구글에서도 찾아본 내용대로도 해봤는데 설치시 똑같은 에러가 뜨네요.. 경로가 잘못된 건지 아니면 설치가 잘 못된건지 모르겠네요..

Last login: Mon Mar 16 21:59:19 on ttys007

You have new mail.

-bash: export: `=': not a valid identifier

The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.

For more details, please visit https://support.apple.com/kb/HT208050.

(base) usang-in-ui-MacBook-Pro:~ usang-in$ conda activate py36

(py36) usang-in-ui-MacBook-Pro:~ usang-in$ python --version

Python 3.6.10 :: Anaconda, Inc.

(py36) usang-in-ui-MacBook-Pro:~ usang-in$ pip install cmake

Requirement already satisfied: cmake in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (3.16.3)

(py36) usang-in-ui-MacBook-Pro:~ usang-in$ pip install dlib

Collecting dlib

  Using cached dlib-19.19.0.tar.gz (3.2 MB)

Building wheels for collected packages: dlib

  Building wheel for dlib (setup.py) ... error

  ERROR: Command errored out with exit status 1:

   command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-wheel-5uhzbj0b

       cwd: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/

  Complete output (67 lines):

  running bdist_wheel

  running build

  running build_py

  package init file 'dlib/__init__.py' not found (or not a regular file)

  running build_ext

  Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

  Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

  -- The C compiler identification is unknown

  -- The CXX compiler identification is unknown

  -- Check for working C compiler: /usr/bin/cc

  -- Check for working C compiler: /usr/bin/cc -- broken

  CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

    The C compiler

  

      "/usr/bin/cc"

  

    is not able to compile a simple test program.

  

    It fails with the following output:

  

      Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

  

      Run Build Command(s):/usr/bin/make cmTC_a1d48/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  

  

  

  

  

    CMake will not be able to correctly generate this project.

  Call Stack (most recent call first):

    CMakeLists.txt:3 (project)

  

  

  -- Configuring incomplete, errors occurred!

  See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

  See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py", line 261, in <module>

      'Topic :: Software Development',

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

      return distutils.core.setup(**attrs)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

      dist.run_commands()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

      self.run_command(cmd)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run

      self.run_command('build')

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

      self.run_command(cmd_name)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py", line 135, in run

      self.build_extension(ext)

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py", line 172, in build_extension

      subprocess.check_call(cmake_setup, cwd=build_folder)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

  ----------------------------------------

  ERROR: Failed building wheel for dlib

  Running setup.py clean for dlib

Failed to build dlib

Installing collected packages: dlib

    Running setup.py install for dlib ... error

    ERROR: Command errored out with exit status 1:

     command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-axjp1fr0/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib

         cwd: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/

    Complete output (69 lines):

    running install

    running build

    running build_py

    package init file 'dlib/__init__.py' not found (or not a regular file)

    running build_ext

    Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

    Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

    -- The C compiler identification is unknown

    -- The CXX compiler identification is unknown

    -- Check for working C compiler: /usr/bin/cc

    -- Check for working C compiler: /usr/bin/cc -- broken

    CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

      The C compiler

    

        "/usr/bin/cc"

    

      is not able to compile a simple test program.

    

      It fails with the following output:

    

        Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

    

        Run Build Command(s):/usr/bin/make cmTC_770b5/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    

    

    

    

    

      CMake will not be able to correctly generate this project.

    Call Stack (most recent call first):

      CMakeLists.txt:3 (project)

    

    

    -- Configuring incomplete, errors occurred!

    See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

    See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py", line 261, in <module>

        'Topic :: Software Development',

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

        return distutils.core.setup(**attrs)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

        dist.run_commands()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run

        self.run_command('build')

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

        self.run_command(cmd_name)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py", line 135, in run

        self.build_extension(ext)

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py", line 172, in build_extension

        subprocess.check_call(cmake_setup, cwd=build_folder)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

    ----------------------------------------

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-6_yutmfh/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-axjp1fr0/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib Check the logs for full command output.

(py36) usang-in-ui-MacBook-Pro:~ usang-in$ cd dlib

(py36) usang-in-ui-MacBook-Pro:dlib usang-in$ cd build

(py36) usang-in-ui-MacBook-Pro:build usang-in$ cmake .. -DUSE_AVX_INSTRUCTIONS=1

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- broken

CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/usang-in/dlib/build/CMakeFiles/CMakeTmp

    

    Run Build Command(s):/usr/bin/make cmTC_eb1a5/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    

    

  

  CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

  CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!

See also "/Users/usang-in/dlib/build/CMakeFiles/CMakeOutput.log".

See also "/Users/usang-in/dlib/build/CMakeFiles/CMakeError.log".

(py36) usang-in-ui-MacBook-Pro:build usang-in$ cmake --build

Usage: cmake --build <dir> [options] [-- [native-options]]

Options:

  <dir>          = Project binary directory to be built.

  --parallel [<jobs>], -j [<jobs>]

                 = Build in parallel using the given number of jobs. 

                   If <jobs> is omitted the native build tool's 

                   default number is used.

                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable

                   specifies a default parallel level when this option

                   is not given.

  --target <tgt>..., -t <tgt>... 

                 = Build <tgt> instead of default targets.

  --config <cfg> = For multi-configuration tools, choose <cfg>.

  --clean-first  = Build target 'clean' first, then build.

                   (To clean only, use --target 'clean'.)

  --verbose, -v  = Enable verbose output - if supported - including

                   the build commands to be executed. 

  --             = Pass remaining options to the native tool.

(py36) usang-in-ui-MacBook-Pro:build usang-in$ cd ..

(py36) usang-in-ui-MacBook-Pro:dlib usang-in$ python setup.py install --yes USE_AVX_INSTRUCTIONS

The --yes options to dlib's setup.py don't do anything since all these options 

are on by default.  So --yes has been removed.  Do not give it to setup.py.

(py36) usang-in-ui-MacBook-Pro:dlib usang-in$ pip install face_recognition

Collecting face_recognition

  Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)

Collecting dlib>=19.7

  Using cached dlib-19.19.0.tar.gz (3.2 MB)

Requirement already satisfied: face-recognition-models>=0.3.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from face_recognition) (0.3.0)

Requirement already satisfied: Click>=6.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from face_recognition) (7.1.1)

Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from face_recognition) (1.16.0)

Requirement already satisfied: Pillow in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from face_recognition) (5.4.1)

Building wheels for collected packages: dlib

  Building wheel for dlib (setup.py) ... error

  ERROR: Command errored out with exit status 1:

   command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-wheel-8882aqkt

       cwd: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/

  Complete output (67 lines):

  running bdist_wheel

  running build

  running build_py

  package init file 'dlib/__init__.py' not found (or not a regular file)

  running build_ext

  Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

  Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

  -- The C compiler identification is unknown

  -- The CXX compiler identification is unknown

  -- Check for working C compiler: /usr/bin/cc

  -- Check for working C compiler: /usr/bin/cc -- broken

  CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

    The C compiler

  

      "/usr/bin/cc"

  

    is not able to compile a simple test program.

  

    It fails with the following output:

  

      Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

  

      Run Build Command(s):/usr/bin/make cmTC_69237/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  

  

  

  

  

    CMake will not be able to correctly generate this project.

  Call Stack (most recent call first):

    CMakeLists.txt:3 (project)

  

  

  -- Configuring incomplete, errors occurred!

  See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

  See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py", line 261, in <module>

      'Topic :: Software Development',

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

      return distutils.core.setup(**attrs)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

      dist.run_commands()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

      self.run_command(cmd)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run

      self.run_command('build')

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

      self.run_command(cmd_name)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py", line 135, in run

      self.build_extension(ext)

    File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py", line 172, in build_extension

      subprocess.check_call(cmake_setup, cwd=build_folder)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

  ----------------------------------------

  ERROR: Failed building wheel for dlib

  Running setup.py clean for dlib

Failed to build dlib

Installing collected packages: dlib, face-recognition

    Running setup.py install for dlib ... error

    ERROR: Command errored out with exit status 1:

     command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-ls25r5b7/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib

         cwd: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/

    Complete output (69 lines):

    running install

    running build

    running build_py

    package init file 'dlib/__init__.py' not found (or not a regular file)

    running build_ext

    Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

    Invoking CMake setup: 'cmake /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

    -- The C compiler identification is unknown

    -- The CXX compiler identification is unknown

    -- Check for working C compiler: /usr/bin/cc

    -- Check for working C compiler: /usr/bin/cc -- broken

    CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

      The C compiler

    

        "/usr/bin/cc"

    

      is not able to compile a simple test program.

    

      It fails with the following output:

    

        Change Dir: /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

    

        Run Build Command(s):/usr/bin/make cmTC_18304/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    

    

    

    

    

      CMake will not be able to correctly generate this project.

    Call Stack (most recent call first):

      CMakeLists.txt:3 (project)

    

    

    -- Configuring incomplete, errors occurred!

    See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

    See also "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py", line 261, in <module>

        'Topic :: Software Development',

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

        return distutils.core.setup(**attrs)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

        dist.run_commands()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run

        self.run_command('build')

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

        self.run_command(cmd_name)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py", line 135, in run

        self.build_extension(ext)

      File "/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py", line 172, in build_extension

        subprocess.check_call(cmake_setup, cwd=build_folder)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

    ----------------------------------------

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py'"'"'; __file__='"'"'/private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-install-du2b795w/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_2/f0m32tsj68sf2fx0l4nhmh7w0000gn/T/pip-record-ls25r5b7/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib Check the logs for full command output.

0

안녕하세요?

Dlib이 한번에 설치되기도 하지만 아나콘다 등 다른 환경과 잘 안맞으면 설치가 잘 안되는 경우를 종종 봤습니다.

이미 여러가지를 시도해 보셨는데도 안되고 있으니 좀 복잡하지만 dlib을 직접 cmake로 빌드해 보는 방벚을 시조해 봐야겠습니다.

여러 포스트 중 윈도우를 기반으로 하지만 아래 내용이 쉽게 설명되어 있고 성공하신 분도 많더라고요.

https://sulastri.tistory.com/m/3

맥을 쓰시는 것 같아 맥에서 실행하는 코드도 보내오니 테스트 해보세요.

이때 python은 3.x버전이어야 합니다. 2버전으로 연결해 두셨으면 python3로 실행해 주세요.

$ git clone https://github.com/davisking/dlib.git
$ cd dlib
$ mkdir build
$ cd build
$ cmake .. -DUSE_AVX_INSTRUCTIONS=1
$ cmake --build .
$ cd ..
$ python setup.py install --yes USE_AVX_INSTRUCTIONS

 

설치가 잘 안되서 힘이 드시겠지만 해결하고 나면 기쁨도 커지더라고요.

해결되시길 바라며 결과를 알려주시면 감사하겠습니다.

감사합니다.

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.15

conda navigator 에서 ComputerVision 에 있는 내용 다 지우고 다시 해봐도 안되네요 ㅠㅠ

늦은 시간 죄송합니다..

0

안녕하세요?

dlib과 기존 설치된 파이썬과 충돌을 일으켰거나 보통은 운영체제의 권한문제로 설치가 완전히 안되어 문제를 일으키는 경우 등 다양한 요인으로 설치가 안되는 경우가 종종있습니다.

이미 업데이트를 하셨지만 아래의 방법으로 해결된 분이 계시니 

pip uninstall ~하여 해당 라이브러리를 삭제하고 pip install -U pip.로 pip를 업데이트하면서 캐시를 Clear하고 

다시 부팅 후 새로 설치해 보시길 추천합니다. 

그래도 같은 현상이면 아래 명령으로 아나콘다의 권한 관련 설정을 바꾸고 다시 진행해 보는 방법을 사용해 보겠습니다.

conda config --set ssl_verify false

그렇게 하면 왠만한 경우에는 문제가 해결될 것으로 보이나 그래도 문제가 해결되지 않으시면 다른 복잡한 방법을 사용할 건데,

제가 현재는 외부에 있어서 테스트를 하기 어려우니 내일 제 작업환경에서 진행해 보겠습니다.

위의 방법으로 해결되기를 기대합니다.

감사합니다.    

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.15

다시 pip3 업그레이드 해보고

sudo -H pip3 install dlib 해서 안되네요 ㅠㅠ

cmake는 정상적으로 설치가 됐는데 dlib이 설치가 안되네욤..

(ComputerVision) usang-in-ui-MacBook-Pro:~ usang-in$ sudo -H pip3 install dlib

Collecting dlib

  Using cached dlib-19.19.0.tar.gz (3.2 MB)

Building wheels for collected packages: dlib

  Building wheel for dlib (setup.py) ... error

  ERROR: Command errored out with exit status 1:

   command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-x3k0mevq/dlib/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-x3k0mevq/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/pip-wheel-ek06uc7e

       cwd: /private/tmp/pip-install-x3k0mevq/dlib/

  Complete output (67 lines):

  running bdist_wheel

  running build

  running build_py

  package init file 'dlib/__init__.py' not found (or not a regular file)

  running build_ext

  Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

  Invoking CMake setup: 'cmake /private/tmp/pip-install-x3k0mevq/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-x3k0mevq/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

  -- The C compiler identification is unknown

  -- The CXX compiler identification is unknown

  -- Check for working C compiler: /usr/bin/cc

  -- Check for working C compiler: /usr/bin/cc -- broken

  CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

    The C compiler

  

      "/usr/bin/cc"

  

    is not able to compile a simple test program.

  

    It fails with the following output:

  

      Change Dir: /tmp/pip-install-x3k0mevq/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

  

      Run Build Command(s):/usr/bin/make cmTC_eefd7/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  

  

  

  

  

    CMake will not be able to correctly generate this project.

  Call Stack (most recent call first):

    CMakeLists.txt:3 (project)

  

  

  -- Configuring incomplete, errors occurred!

  See also "/tmp/pip-install-x3k0mevq/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

  See also "/tmp/pip-install-x3k0mevq/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

    File "/private/tmp/pip-install-x3k0mevq/dlib/setup.py", line 261, in <module>

      'Topic :: Software Development',

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

      return distutils.core.setup(**attrs)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

      dist.run_commands()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

      self.run_command(cmd)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 188, in run

      self.run_command('build')

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

      self.run_command(cmd_name)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

      cmd_obj.run()

    File "/private/tmp/pip-install-x3k0mevq/dlib/setup.py", line 135, in run

      self.build_extension(ext)

    File "/private/tmp/pip-install-x3k0mevq/dlib/setup.py", line 172, in build_extension

      subprocess.check_call(cmake_setup, cwd=build_folder)

    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '/private/tmp/pip-install-x3k0mevq/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-x3k0mevq/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

  ----------------------------------------

  ERROR: Failed building wheel for dlib

  Running setup.py clean for dlib

Failed to build dlib

Installing collected packages: dlib

    Running setup.py install for dlib ... error

    ERROR: Command errored out with exit status 1:

     command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-x3k0mevq/dlib/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-x3k0mevq/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-hrgb6965/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib

         cwd: /private/tmp/pip-install-x3k0mevq/dlib/

    Complete output (69 lines):

    running install

    running build

    running build_py

    package init file 'dlib/__init__.py' not found (or not a regular file)

    running build_ext

    Building extension for Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)

    Invoking CMake setup: 'cmake /private/tmp/pip-install-x3k0mevq/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-x3k0mevq/dlib/build/lib.macosx-10.9-x86_64-3.6 -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'

    -- The C compiler identification is unknown

    -- The CXX compiler identification is unknown

    -- Check for working C compiler: /usr/bin/cc

    -- Check for working C compiler: /usr/bin/cc -- broken

    CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

      The C compiler

    

        "/usr/bin/cc"

    

      is not able to compile a simple test program.

    

      It fails with the following output:

    

        Change Dir: /tmp/pip-install-x3k0mevq/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeTmp

    

        Run Build Command(s):/usr/bin/make cmTC_9bc71/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    

    

    

    

    

      CMake will not be able to correctly generate this project.

    Call Stack (most recent call first):

      CMakeLists.txt:3 (project)

    

    

    -- Configuring incomplete, errors occurred!

    See also "/tmp/pip-install-x3k0mevq/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeOutput.log".

    See also "/tmp/pip-install-x3k0mevq/dlib/build/temp.macosx-10.9-x86_64-3.6/CMakeFiles/CMakeError.log".

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/private/tmp/pip-install-x3k0mevq/dlib/setup.py", line 261, in <module>

        'Topic :: Software Development',

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup

        return distutils.core.setup(**attrs)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup

        dist.run_commands()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run

        self.run_command('build')

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run

        self.run_command(cmd_name)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

      File "/private/tmp/pip-install-x3k0mevq/dlib/setup.py", line 135, in run

        self.build_extension(ext)

      File "/private/tmp/pip-install-x3k0mevq/dlib/setup.py", line 172, in build_extension

        subprocess.check_call(cmake_setup, cwd=build_folder)

      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '/private/tmp/pip-install-x3k0mevq/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-x3k0mevq/dlib/build/lib.macosx-10.9-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

    ----------------------------------------

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-x3k0mevq/dlib/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-x3k0mevq/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-hrgb6965/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/dlib Check the logs for full command output.

0

안녕하세요?

아래 -H 옵션을 이용하여 Home enviroment를 사용하도록 명령을 실행해 보세요. 

sudo -H pip install dlib

혹시 pip명령으로 안되면 아래 pip3로도 실행해 보세요. 

sudo -H pip3 install dlib

감사합니다.

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.15

pip upgrade 해봤는데 dlib 설치가 안되네요..

(ComputerVision) usang-in-ui-MacBook-Pro:~ usang-in$ sudo pip install dlib

Password:

WARNING: The directory '/Users/usang-in/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting dlib

  Downloading dlib-19.19.0.tar.gz (3.2 MB)

     |████████████████████████████████| 3.2 MB 12.2 MB/s 

Building wheels for collected packages: dlib

  Building wheel for dlib (setup.py) ... error

  ERROR: Command errored out with exit status 1:

   command: /Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-ck0emkgu/dlib/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-ck0emkgu/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/pip-wheel-l1hia1ts

       cwd: /private/tmp/pip-install-ck0emkgu/dlib/

  Complete output (67 lines):

  running bdist_wheel

  running build

  running build_py

  package init file 'dlib/__init__.py' not found (or not a regular file)

  running build_ext

  Building extension for Python 3.8.2 | packaged by conda-forge | (default, Mar  5 2020, 16:54:44)

  Invoking CMake setup: 'cmake /private/tmp/pip-install-ck0emkgu/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-ck0emkgu/dlib/build/lib.macosx-10.9-x86_64-3.8 -DPYTHON_EXECUTABLE=/Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8 -DCMAKE_BUILD_TYPE=Release'

  -- The C compiler identification is unknown

  -- The CXX compiler identification is unknown

  -- Check for working C compiler: /usr/bin/cc

  -- Check for working C compiler: /usr/bin/cc -- broken

  CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

    The C compiler

  

      "/usr/bin/cc"

  

    is not able to compile a simple test program.

  

    It fails with the following output:

  

      Change Dir: /tmp/pip-install-ck0emkgu/dlib/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeTmp

  

      Run Build Command(s):/usr/bin/make cmTC_34268/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  

  

  

  

  

    CMake will not be able to correctly generate this project.

  Call Stack (most recent call first):

    CMakeLists.txt:3 (project)

  

  

  -- Configuring incomplete, errors occurred!

  See also "/tmp/pip-install-ck0emkgu/dlib/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeOutput.log".

  See also "/tmp/pip-install-ck0emkgu/dlib/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeError.log".

  Traceback (most recent call last):

    File "<string>", line 1, in <module>

    File "/private/tmp/pip-install-ck0emkgu/dlib/setup.py", line 223, in <module>

      setup(

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup

      return distutils.core.setup(**attrs)

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/core.py", line 148, in setup

      dist.run_commands()

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 966, in run_commands

      self.run_command(cmd)

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 985, in run_command

      cmd_obj.run()

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run

      self.run_command('build')

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 985, in run_command

      cmd_obj.run()

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/command/build.py", line 135, in run

      self.run_command(cmd_name)

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/cmd.py", line 313, in run_command

      self.distribution.run_command(command)

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 985, in run_command

      cmd_obj.run()

    File "/private/tmp/pip-install-ck0emkgu/dlib/setup.py", line 135, in run

      self.build_extension(ext)

    File "/private/tmp/pip-install-ck0emkgu/dlib/setup.py", line 172, in build_extension

      subprocess.check_call(cmake_setup, cwd=build_folder)

    File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/subprocess.py", line 364, in check_call

      raise CalledProcessError(retcode, cmd)

  subprocess.CalledProcessError: Command '['cmake', '/private/tmp/pip-install-ck0emkgu/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-ck0emkgu/dlib/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

  ----------------------------------------

  ERROR: Failed building wheel for dlib

  Running setup.py clean for dlib

Failed to build dlib

Installing collected packages: dlib

    Running setup.py install for dlib ... error

    ERROR: Command errored out with exit status 1:

     command: /Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-ck0emkgu/dlib/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-ck0emkgu/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-9qko8sht/install-record.txt --single-version-externally-managed --compile --install-headers /Users/usang-in/opt/anaconda3/envs/ComputerVision/include/python3.8/dlib

         cwd: /private/tmp/pip-install-ck0emkgu/dlib/

    Complete output (69 lines):

    running install

    running build

    running build_py

    package init file 'dlib/__init__.py' not found (or not a regular file)

    running build_ext

    Building extension for Python 3.8.2 | packaged by conda-forge | (default, Mar  5 2020, 16:54:44)

    Invoking CMake setup: 'cmake /private/tmp/pip-install-ck0emkgu/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-ck0emkgu/dlib/build/lib.macosx-10.9-x86_64-3.8 -DPYTHON_EXECUTABLE=/Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8 -DCMAKE_BUILD_TYPE=Release'

    -- The C compiler identification is unknown

    -- The CXX compiler identification is unknown

    -- Check for working C compiler: /usr/bin/cc

    -- Check for working C compiler: /usr/bin/cc -- broken

    CMake Error at /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):

      The C compiler

    

        "/usr/bin/cc"

    

      is not able to compile a simple test program.

    

      It fails with the following output:

    

        Change Dir: /tmp/pip-install-ck0emkgu/dlib/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeTmp

    

        Run Build Command(s):/usr/bin/make cmTC_48fae/fast && xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    

    

    

    

    

      CMake will not be able to correctly generate this project.

    Call Stack (most recent call first):

      CMakeLists.txt:3 (project)

    

    

    -- Configuring incomplete, errors occurred!

    See also "/tmp/pip-install-ck0emkgu/dlib/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeOutput.log".

    See also "/tmp/pip-install-ck0emkgu/dlib/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeError.log".

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/private/tmp/pip-install-ck0emkgu/dlib/setup.py", line 223, in <module>

        setup(

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup

        return distutils.core.setup(**attrs)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/core.py", line 148, in setup

        dist.run_commands()

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 966, in run_commands

        self.run_command(cmd)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 985, in run_command

        cmd_obj.run()

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/command/install.py", line 545, in run

        self.run_command('build')

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 985, in run_command

        cmd_obj.run()

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/command/build.py", line 135, in run

        self.run_command(cmd_name)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/distutils/dist.py", line 985, in run_command

        cmd_obj.run()

      File "/private/tmp/pip-install-ck0emkgu/dlib/setup.py", line 135, in run

        self.build_extension(ext)

      File "/private/tmp/pip-install-ck0emkgu/dlib/setup.py", line 172, in build_extension

        subprocess.check_call(cmake_setup, cwd=build_folder)

      File "/Users/usang-in/opt/anaconda3/envs/ComputerVision/lib/python3.8/subprocess.py", line 364, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', '/private/tmp/pip-install-ck0emkgu/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-install-ck0emkgu/dlib/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

    ----------------------------------------

ERROR: Command errored out with exit status 1: /Users/usang-in/opt/anaconda3/envs/ComputerVision/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-ck0emkgu/dlib/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-ck0emkgu/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-9qko8sht/install-record.txt --single-version-externally-managed --compile --install-headers /Users/usang-in/opt/anaconda3/envs/ComputerVision/include/python3.8/dlib Check the logs for full command output.

0

안녕하세요?

가끔 설치가 애를 먹이는 경우가 있습니다.

보내주신 메시지로만 봐서는 cmake의 실행권한 문제로 보이는데

일단 pip도 오래되었으니 업데이트 해야 할 것 같습니다.

pip install --upgrade pip

위 명령으로 pip를 최신상태로 업데이트 하고 명령창을 닫은 후 새 명령창에서 다시 설치해보세요.

그래도 동일한 문제가 발생하면

sudo pip install dlib

으로 권한을 상승시켜서 다시 설치해 보세요.

실행해 보시고 계속 문제가 해결되지 않으면 지금처럼 로그를 같이 보내주세요.

감사합니다.