Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency issue in installation script #7

Closed
szelag82 opened this issue Feb 20, 2018 · 16 comments
Closed

Dependency issue in installation script #7

szelag82 opened this issue Feb 20, 2018 · 16 comments

Comments

@szelag82
Copy link

hi, I receive the following errors and the howdy command is not available after installation (ubuntu 17.10, IR led blinks during the test):

Traceback (most recent call last):
File "/tmp/howdy_install.py", line 94, in
handleStatus(subprocess.call(["git", "clone", "https://github.com/davisking/dlib.git", "/tmp/dlib_clone"]))
File "/usr/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'

@boltgolt
Copy link
Owner

Missed a dependency, sorry. The merge i just did should fix this.

@szelag82
Copy link
Author

those errors have disappeared but I have a new one:

Traceback (most recent call last):
File "setup.py", line 40, in
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'

@boltgolt
Copy link
Owner

Looks like you don't have pip either, pushed another one to fix that. I'll be here if you get another error.

@szelag82
Copy link
Author

new message at the time of installation (but this is not a error):

The directory '/home/szelag/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/szelag/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: pip in /usr/lib/python2.7/dist-packages

Nothing has changed at the end:

Traceback (most recent call last):
File "setup.py", line 40, in
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'

@boltgolt
Copy link
Owner

Missed one dependency the last time i added packages, that one should work now.

@szelag82
Copy link
Author

nope, still the same error:

Traceback (most recent call last):
File "setup.py", line 40, in
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
Error while running last command

@boltgolt
Copy link
Owner

Fixed setuptools only being available on python2, hopefully you should get past that now?

@szelag82
Copy link
Author

new error :-)

Invoking CMake setup: 'cmake /tmp/dlib_clone/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/dlib_clone/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DUSE_AVX_INSTRUCTIONS=yes -DDLIB_USE_CUDA=no -DCMAKE_BUILD_TYPE=Release'
error: [Errno 2] No such file or directory: 'cmake': 'cmake'
Error while running last command

I have to go to sleep, I'll be back tomorrow to test. thank you for your time!

@szelag82
Copy link
Author

sorry, I installed cmake and the installation went on, but there is still an error:

File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.
Error while running last command

@boltgolt
Copy link
Owner

That looks nasty. What version of Ubuntu are you running and has nothing else been printed to the console?

@boltgolt boltgolt reopened this Feb 21, 2018
@boltgolt boltgolt changed the title Not working Dependency issue in installation script Feb 21, 2018
@magarto
Copy link

magarto commented Feb 25, 2018

Real error is

/tmp/dlib_clone/dlib/external/pybind11/include/pybind11/detail/common.h:111:10: fatal error: Python.h: such file not found

It is due to we have Anaconda already installed. You can check it with

$python --version
Python 3.6.4 :: Anaconda, Inc.

To fix it, change "python" references to "python3" in installer.py line 39. We are using python 3.x but apt installs python 2.x packages.py

Now, we could install everything but "sudo -i" shows the following error:

Traceback (most recent call last):
File "/lib/security/howdy/compare.py", line 11, in
import cv2
ModuleNotFoundError: No module named 'cv2'
Unknown error: 1

Now installing cv2 module using "pip3 install opencv-python" doesn't work.

So, to fix it, install cv2 dependency with
$conda install -c menpo opencv

Later on, we have error in face_detection module, so I fix it adding it.
$ pip install face_recognition

Now, howdy works

Anyway, in low light conditions, howdy wouldn't work so it will take us about 10 seconds to be able to prompt password in sudo and login screen so a good idea would be to be able to prompt password in the same time howdy is trying to detect our face without waiting howdy script to exit

@boltgolt
Copy link
Owner

Thanks so much for figuring this out, i'll fix the python2 apt packages.

I can't reproduce the last 2 errors, and i can't really expect everyone to have conda installed. Might need to add information on how to fix that installation error in the readme.

I've added the last note as a new issue at #9. However, i'm not sure how this can be implemented. It needs to be done in PAM but i don't know enough about it to fix it and online manuals are few and far between.

@boltgolt
Copy link
Owner

As i've had no other reports of the specific issue with cv2, i'm going to close this for now. Feel free to comment if you've also encountered this error.

@reverland
Copy link

apt install python3-opencv just works for me.
on ubuntu 18.04

@boltgolt
Copy link
Owner

It also works as expected on the travis 16.04 instance, it seems very machine dependent

@reverland
Copy link

reverland commented Aug 2, 2018

maybe I should comment on issue #32 but commentted here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants