3

I am trying to install dlib and run the code from here. After installing dlib when I execute the line

python detect_face_features.py --shape-predictor shape_predictor_68_face_landmarks.dat --image images/image_1.jpg

I get the error Illegal instruction: 4

I tried creating a virtual environment first and install dlib and opencv. The files get imported but on running the code on python I get the same error. I clean installed it on my root environment but still the same error. I can't figure out what library or file is broken as other python files work as expected. I am working on MacOS 10.11.6 with XCode version 8.2.1 I installed the dlib with reference to this site.

Please tell me how to fix this. Thank you.

Edit: My MacBook is of mid 2010 build and it doesn't have AVX instructions built into it. I tried installing dlib again by explicitly switching off AVX instructions but the problem still persists.

sudo python3 setup.py install --no USE_AVX_INSTRUCTIONS

I also tried this solution but couldn't find the line

set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")

on dlib's path tools/python/CMakeLists.txt

Please tell me how can I fix this issue. Thank You.

  • Maybe is related to the version of the packages you are using? I have seen this with many numerical modules, e.g.: https://stackoverflow.com/questions/49084934/illegal-instruction-4-when-importing-tensorflow-in-python-3-6 – cmaureir Jan 31 '19 at 09:34
  • @cmaureir How do I check which versions are causing the trouble? – Saloni Mundra Jan 31 '19 at 10:23

0 Answers0