conda-installed dlib has no attribute 'image_window' even though X11 is installed
I am on a mac os X Yosemite. I installed dlib with anaconda with:
conda install -c conda-forge dlib=19.4
and removed X11 from anaconda/lib since the X11 distributed by anaconda is presumably broken. Then I installed Xquartz from https://www.xquartz.org/.
But when I go into ipython and import dlib, and type
dlib.image_window()
I am still getting error:
AttributeError: 'module' object has no attribute 'image_window'
What's the issue?
Note I tried installing dlib from scratch when anaconda is not in my system, and I ran into all kinds of other issues. So currently I am committed to making dlib work with anaconda, which it does, except for image_window and presumably other things associated with X11.
I don't know. Try the latest dlib from github. There were some updates a little bit ago that tried to ignore any X11 files in anaconda folders. Maybe that will help.
my system is ubuntu 16.04, all dependencies (Boost, Boost.python, make, installed) Installed using conda..... (opencv) jorgher@jorgher-Lenovo-G575: conda install -c menpo dlib (opencv) jorgher@jorgher-Lenovo-G575:~/Documents/dlib/python_examples$ python face_detector.py ../examples/faces/*.jpg Traceback (most recent call last): File "face_detector.py", line 52, in win = dlib.image_window() AttributeError: module 'dlib' has no attribute 'image_window'
Any advice
Try dlib from github.
Did that no problems in compiling.
Processing dlib-19.4.99-py3.6-linux-x86_64.egg creating /home/jorgher/anaconda3/envs/opencv/lib/python3.6/site-packages/dlib-19.4.99-py3.6-linux-x86_64.egg Extracting dlib-19.4.99-py3.6-linux-x86_64.egg to home/jorgher/anaconda3/envs/opencv/lib/python3.6/site-packages Adding dlib 19.4.99 to easy-install.pth file
Installed /home/jorgher/anaconda3/envs/opencv/lib/python3.6/site-packages/dlib-19.4.99-py3.6-linux-x86_64.egg Processing dependencies for dlib==19.4.99 Finished processing dependencies for dlib==19.4.99
when use in example (opencv) jorgher@jorgher-Lenovo-G575:~/Documents/dlib/python_examples$ python face_detector.py ../examples/faces/*.jpg Instrucción ilegal (`core' generado)
receive the above message.
Any advice? Thanks
Do you have a really old Intel CPU and AVX or SSE4 is enabled?
maybe
My PC has a AMD E-350 1.6 Gh
Yes, that's very old. Recompile without AVX or SSE instructions and it will run fine.
Traceback (most recent call last):
File "../face_de/step.py", line 13, in
ubutntu 17 and conda
When you compile dlib it will print messages saying that it didn't find X11 and so there won't be GUI support. Read those messages. They tell you how to install X11 so that this will work.
Did anyone solve this issue?
Get the new dlib 19.9 and try running python setup.py install.
I had the same error, skip building from source, installation with pip works fine. Here is my solution
- install X11 first
- uninstall dlib: pip uninstall dlib
- pip install dlib