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

Problems running on Ubuntu 23.04 (lunar) #781

Open
tante opened this issue Apr 20, 2023 · 18 comments
Open

Problems running on Ubuntu 23.04 (lunar) #781

tante opened this issue Apr 20, 2023 · 18 comments
Labels
v2 Old version of Howdy (2.*)

Comments

@tante
Copy link

tante commented Apr 20, 2023

Ubuntu 23.04 comes with a new version of Python (default is 3.11) that makes howdy not run properly.

The first issue is line 10 in pam.py:
import ConfigParser
The module is now called configparser so howdy can't properly import it.

Then the python 'dlib' module was missing, I installed it via sudo pip install --break-system-packages dlib.

Doing a mitigation by changing that line to import configparser as ConfigParser makes howdy work in GDM for login but when using it in sudo creates a funky error:

Traceback (most recent call last):
  File "/lib/security/howdy/compare.py", line 23, in <module>
    from recorders.video_capture import VideoCapture

The strange thing is: If you add import recorders to the file there is no problem. Just importing that submodule fails and seemingly only while trying it via sudo.


Linux distribution (if applicable): Ubuntu 23.04

Howdy version (sudo howdy version): Howdy 2.6.1

@ashkop
Copy link

ashkop commented Apr 21, 2023

After changing the configparser import I had a different issue:

ModuleNotFoundError: No module named 'dlib'

After installing dlib with sudo pip install --break-system-packages dlib everything is working now.

@kimhongsu
Copy link

@ashkop You made my day.
Howdy is working fine in my Kubuntu 23.04 now.

sudo apt install -y python3-opencv
sudo pip install --break-system-packages dlib
sudo howdy add

@ashkop
Copy link

ashkop commented Apr 21, 2023

@kimhongsu I'm glad that helped. Would still be nice if howdy can be fully updated to python 3.

@adamlove86
Copy link

Purge and reinstall seems to have run into errors:

Setting up howdy (2.6.1) ...

>>> Upgrading pip to the latest version

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Error while running last command
dpkg: error processing package howdy (--configure):
 installed howdy package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for libc-bin (2.37-0ubuntu2) ...
Errors were encountered while processing:
 howdy
E: Sub-process /usr/bin/dpkg returned an error code (1)

@mstrobl2
Copy link

mstrobl2 commented Apr 23, 2023

Here's my ugly hack workaround that also works for fresh install of howdy on 23.04, just skip the "apt remove howdy" command. Doing this also fixes the error when authenticating sudo in the first comment.

sudo -i
mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/DISABLED-EXTERNALLY-MANAGED
apt remove howdy
pip3 install dlib
apt install howdy
nano /lib/security/howdy/pam.py # Change ConfigParser to configparser on 2 lines
mv /usr/lib/python3.11/DISABLED-EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED

@skjerns
Copy link

skjerns commented Apr 23, 2023

nano /lib/security/howdy/pam.py # Change ConfigParser to configparser on 2 lines

note: You also need to change it elsewhere, or just change the line to import configparser as ConfigParser

@boltgolt
Copy link
Owner

This is an annoying one, using --break-system-packages should help but it's really not the clean way to do it. Maybe a venv for Howdy would be better

@Arad-Afzali
Copy link

I've recently updated to Ubuntu 23.04 and Howdy is not working on the lock screen. I tried to reinstall it but it didn't work.
I can still add new faces and Howdy seems to work fine in the terminal and gives me no errors.

@l3ifk l3ifk mentioned this issue May 4, 2023
@dingwen07
Copy link

--break-system-packages is not a good practice. Maybe howdy could use virtual environments to install this package.

@nate3D
Copy link

nate3D commented May 26, 2023

Purge and reinstall seems to have run into errors:

Setting up howdy (2.6.1) ...

>>> Upgrading pip to the latest version

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Error while running last command
dpkg: error processing package howdy (--configure):
 installed howdy package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for libc-bin (2.37-0ubuntu2) ...
Errors were encountered while processing:
 howdy
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've got the exact same issue with a fresh install of Ubuntu 23.04 Linux 6.2.0-20-generic 64-bit. Wrapping howdy inside of it's own venv would be the optimal solution here and for isolating its install further from the host.

@MurzNN
Copy link

MurzNN commented Jun 10, 2023

@nate3D Thanks for the solution, could you please share an example of how to do the "Wrapping howdy inside of it's own venv"?

@MurzNN
Copy link

MurzNN commented Jun 11, 2023

I've found a solution to the ModuleNotFoundError: No module named 'ConfigParser' error, the fix is in the #799

@Rongronggg9
Copy link

To those who are not willing to use --break-system-packages:

sudo pip install -t /lib/security/howdy dlib

Tested on the beta branch, should work on master.

@kimhongsu
Copy link

This is an annoying one, using --break-system-packages should help but it's really not the clean way to do it. Maybe a venv for Howdy would be better

@boltgolt Could you let us know how to wrap howdy up with venv? Or is it possible to wrap howdy up with docker?

@Spurlos
Copy link

Spurlos commented Sep 22, 2023

To those who are not willing to use --break-system-packages:

sudo pip install -t /lib/security/howdy dlib

Tested on the beta branch, should work on master.

@boltgolt Perhaps this fix can be incorporated in release or at least beta?

@g1ronn1mo
Copy link

To those who are not willing to use --break-system-packages:

sudo pip install -t /lib/security/howdy dlib

Tested on the beta branch, should work on master.

@boltgolt Perhaps this fix can be incorporated in release or at least beta?

Tried on ubuntu 23.10 Could install howdy after installing dlib like this, but could not run howdy.

@4mritGiri
Copy link

Purge and reinstall seems to have run into errors:

Setting up howdy (2.6.1) ...

>>> Upgrading pip to the latest version

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Error while running last command
dpkg: error processing package howdy (--configure):
 installed howdy package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for libc-bin (2.37-0ubuntu2) ...
Errors were encountered while processing:
 howdy
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am also get the same problem on Ubuntu version 23.10.1

Howdy Installation Issue on Ubuntu 23.10.1

Problem:

I encountered an issue with Howdy installation on Ubuntu version 23.10.1. The provided solutions seemed to have complications.

Workaround:

I found a workaround that worked for me, even on a fresh install of Ubuntu 23.10.1. Skip the "apt remove howdy" command to avoid additional errors during sudo authentication.

  1. Open a root shell:

    sudo -i
    
  2. Move the EXTERNALLY-MANAGED directory:

      mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/DISABLED-EXTERNALLY-MANAGED
    
  3. Remove Howdy (skip if fresh install):

     apt remove howdy
    
  4. Install dlib using pip3:
    pip3 install dlib

    If pip3 doesn't work, try pip install dlib. If that also fails, attempt:
    sudo pip install --break-system-packages dlib

  5. Reinstall Howdy:

     apt install howdy
    
  6. Edit pam.py to fix import error:

     nano /lib/security/howdy/pam.py
    

Change import ConfigParser to import configparser as ConfigParser you can find on lines 2 to 11.

  1. Restore EXTERNALLY-MANAGED directory:
     mv /usr/lib/python3.11/DISABLED-EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED 
    

This workaround should help resolve the installation issues in my case.

While adding face some time you will get device_path problem but i am solve it like this.

 # Should be set automatically by an installer if your distro has one
 # device_path = /dev/v4l/by-path/pci-0000:00:14.0-usb-0:6:1.2-video-index1 # default in my config comment it add new below like this
 device_path = /dev/video0 

@g1ronn1mo
Copy link

#851

I also have a silution without breaking system packages. This solution depends on a dep package which is not released yet.

@saidsay-so saidsay-so added the v2 Old version of Howdy (2.*) label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Old version of Howdy (2.*)
Projects
None yet
Development

No branches or pull requests