howdy icon indicating copy to clipboard operation
howdy copied to clipboard

howdy add error No module named 'numpy'

Open cloudsun9 opened this issue 3 years ago β€’ 24 comments

$ sudo howdy add Traceback (most recent call last): File "/usr/local/bin/howdy", line 95, in import cli.add File "/usr/lib/security/howdy/cli/add.py", line 10, in import numpy as np ModuleNotFoundError: No module named 'numpy'

then $ sudo howdy snapshot Traceback (most recent call last): File "/usr/local/bin/howdy", line 107, in import cli.snap File "/usr/lib/security/howdy/cli/snap.py", line 7, in import snapshot ModuleNotFoundError: No module named 'cv2'

File "/usr/lib/security/howdy/snapshot.py", line 4, in import cv2

I've searched for similar issues already, and my issue has not been reported yet.

Linux distribution Ubuntu 20.10

Howdy 2.6.1

cloudsun9 avatar Dec 17 '20 17:12 cloudsun9

check if python-numpy and python-opencv are currently installed on your system

skewballfox avatar Dec 20 '20 22:12 skewballfox

$ pip3 show numpy Name: numpy Version: 1.19.4 Summary: NumPy is the fundamental package for array computing with Python. Home-page: https://www.numpy.org Author: Travis E. Oliphant et al. Author-email: None License: BSD Location: /home/david/.local/lib/python3.8/site-packages Requires: Required-by: scipy, tifffile, scikit-image, PyWavelets, opencv-python, matplotlib, imageio, wxPython

cloudsun9 avatar Dec 21 '20 08:12 cloudsun9

$ pip3 install opencv-python Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: opencv-python in /usr/local/lib/python3.8/dist-packages (4.4.0.42) Requirement already satisfied: numpy>=1.17.3 in /home/david/.local/lib/python3.8/site-packages (from opencv-python) (1.19.4)

cloudsun9 avatar Dec 21 '20 08:12 cloudsun9

Try sudo pip3 install opencv-python numpy to install the packages in system directories

tux314159 avatar Dec 27 '20 11:12 tux314159

$ sudo pip3 install opencv-python numpy Traceback (most recent call last): File "/lib/security/howdy/compare.py", line 17, in import dlib ModuleNotFoundError: No module named 'dlib' Unknown error: 1 [sudo] password for david: Requirement already satisfied: opencv-python in /usr/local/lib/python3.8/dist-packages (4.4.0.42) Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (1.19.4)

cloudsun9 avatar Dec 27 '20 12:12 cloudsun9

Then...

sudo howdy add Traceback (most recent call last): File "/usr/local/bin/howdy", line 95, in import cli.add File "/usr/lib/security/howdy/cli/add.py", line 10, in import numpy as np ModuleNotFoundError: No module named 'numpy'

cloudsun9 avatar Dec 27 '20 12:12 cloudsun9

Extremely weird, what you did should have fixed the issue. Have you tried reinstalling Howdy itself?

boltgolt avatar Dec 27 '20 17:12 boltgolt

Uninstalled and reinstalled multiple times. I wonder if it is to with the fact I am doing this on Ubuntu 20.10. I asked Slimbook for help with Slimbook Face, before I found out it was just a GUI for Howdy, and they said it works on 20.04 but that they have no ideas about 20.10.

cloudsun9 avatar Dec 27 '20 19:12 cloudsun9

@boltgolt Everything worked fine for me on Ubuntu 20.10, but this problem came after updating to Ubuntu 21.04

It was necessary to install manually sudo pip3 install numpy sudo pip3 install opencv-python sudo pip3 install dlib

VanVan avatar May 15 '21 20:05 VanVan

david@pixie:~$ sudo pip3 install numpy [sudo] password for david: Requirement already satisfied: numpy in /usr/local/lib/python3.9/dist-packages (1.20.2) WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv david@pixie:~$ sudo pip3 install opencv-python Requirement already satisfied: opencv-python in /usr/local/lib/python3.9/dist-packages (4.5.1.48) Requirement already satisfied: numpy>=1.19.3 in /usr/local/lib/python3.9/dist-packages (from opencv-python) (1.20.2) WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv david@pixie:~$ sudo pip3 install dlib Collecting dlib Downloading dlib-19.22.0.tar.gz (7.4 MB) |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7.4 MB 2.5 MB/s Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... done Created wheel for dlib: filename=dlib-19.22.0-cp39-cp39-linux_x86_64.whl size=4353319 sha256=9b48f6de28b42af522e3c249c25d2d89cca26ec18d7c78f095a7a00a640df4fc Stored in directory: /root/.cache/pip/wheels/33/2c/16/6ceb1bda8e67571304aaf3cd80c8cb47dc8d5ab99e34bda88b Successfully built dlib Installing collected packages: dlib Successfully installed dlib-19.22.0 WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv david@pixie:~$

cloudsun9 avatar May 15 '21 21:05 cloudsun9

Ubuntu 21.04 This is new. Traceback (most recent call last): File "/var/lib/dpkg/info/howdy.postinst", line 110, in handleStatus(sc(["pip3", "install", "--upgrade", "pip"])) File "/usr/lib/python3.9/subprocess.py", line 349, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'pip3' dpkg: error processing package howdy (--configure): installed howdy package post-installation script subprocess returned error exit status 1 Processing triggers for man-db (2.9.4-2) ... Errors were encountered while processing: howdy E: Sub-process /usr/bin/dpkg returned an error code (1) david@pixie:~$

cloudsun9 avatar May 15 '21 21:05 cloudsun9

The problem was fixed for me by installing only the packages specified in my previous message. I didn't invest more, but if you don't use python packages for other programs, you can uninstall all the python packages and howdy and try to reinstall the whole thing

VanVan avatar May 15 '21 21:05 VanVan

This is still a problem...

NightMasterX avatar Nov 30 '21 12:11 NightMasterX

Maybe using the distribution's repo is a better idea than using pip: sudo apt install python3-numpy?

EmixamPP avatar Dec 04 '21 18:12 EmixamPP

sudo apt install python3-numpy Done long ago. I get the same with other python solutions though, so not your fault.

cloudsun9 avatar Dec 04 '21 19:12 cloudsun9

Same issue on Pop_OS 22.04

Lyton505 avatar Sep 06 '22 14:09 Lyton505

Hey @boltgolt are you still looking into this issue? I can confirm this is a problem on PopOS 22.04 too

Lyton505 avatar Mar 06 '23 13:03 Lyton505

It usually seems to be an issue where the python environment pip uses is not the one that Howdy will load into. Maybe:

python3 -m pip install numpy
python3 -m pip install opencv-python
python3 -m pip install dlib

All three should result in a Requirement already satisfied

boltgolt avatar Mar 09 '23 15:03 boltgolt

Nope, that's still not it. I believe howdy is looking in the wrong (old?) locations. I'm on Ubuntu 22.10 now.

cloudsun9 avatar Mar 09 '23 16:03 cloudsun9

Howdy just imports like any other python3 script. Maybe you can look into similar issues with other python programs?

boltgolt avatar Mar 10 '23 14:03 boltgolt

I think I can confirm that this happens after release upgrade. I upgrdaded from 22.04 to 23.04 and this happened

esseswann avatar Aug 07 '23 20:08 esseswann

Disappointing.

cloudsun9 avatar Aug 07 '23 21:08 cloudsun9

Do you have multiple versions of Python installed on your system?

saidsay-so avatar Dec 23 '23 14:12 saidsay-so

this work for me on debian 12: $nano ~/.bashrc in the end of this file(bashrc) write: export PATH="$HOME/.local/bin:$PATH" save the file with ctrl+x, y, enter source ~/.bashrc reinstall te packages (numpy, opencv-python,dlib )

rb58853 avatar Feb 22 '24 07:02 rb58853