![无法在 Ubuntu 中安装 Howdy](https://linux22.com/image/1199603/%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%20%E4%B8%AD%E5%AE%89%E8%A3%85%20Howdy.png)
每次我尝试安装 howdy 时,都会收到相同的消息,我甚至尝试创建一个虚拟 python 环境,但没有成功。{将 pip 升级到最新版本时出现错误:externally-managed-environment
× 此环境由外部管理 ╰─> 要在系统范围内安装 Python 包,请尝试 apt install python3-xyz,其中 xyz 是您要安装的包。
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.
}
答案1
我试图弄清楚 OP 在这里看到的消息。因此,我启动了 Ubuntu 23.10 VM 并逐步完成安装https://github.com/boltgolt/howdy
运行以下命令:
sudo add-apt-repository ppa:boltgolt/howdy
sudo apt update
sudo apt install howdy
在安装过程中确实出现了错误消息:
错误:外部管理环境
× 此环境由外部管理 ╰─> 要在系统范围内安装 Python 包,请尝试 apt install python3-xyz,其中 xyz 是您要安装的包。
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.
注意:如果您认为这是一个错误,请联系您的 Python 安装或操作系统分发提供商。您可以通过传递 --break-system-packages 来覆盖此错误,但可能会破坏您的 Python 安装或操作系统。
根据解决方案https://github.com/boltgolt/howdy/issues/807#issuecomment-1615973699我sudo apt install howdy
再次运行了该命令。
terrance@ubuntu2310-test:~$ sudo apt install howdy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
howdy is already the newest version (2.6.1).
The following packages were automatically installed and are no longer required:
dkms libgsoap-2.8.124 liblzf1 libtpms0 libvncserver1 virtualbox-dkms
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up howdy (2.6.1) ...
Attempting installation of missing data files
Downloading 3 required data files...
dlib_face_recogniti 100%[===================>] 20.44M 2.02MB/s in 9.8s
mmod_human_face_det 100%[===================>] 678.41K 3.46MB/s in 0.2s
shape_predictor_5_f 100%[===================>] 5.44M 3.72MB/s in 1.5s
Unpacking...
我创建了链接howdy
sudo ln /lib/security/howdy/cli.py /usr/local/bin/howdy
现在该howdy
应用程序运行良好。
terrance@ubuntu2310-test:~$ howdy
current active user: terrance
usage: howdy [-U USER] [-y] [-h] command [argument]
Command line interface for Howdy face authentication.
positional arguments:
command The command option to execute, can be one of the
following: add, clear, config, disable, list, remove,
snapshot, test or version.
argument Either 0 (enable) or 1 (disable) for the disable
command, or the model ID for the remove command.
options:
-U USER, --user USER Set the user account to use.
-y Skip all questions.
-h, --help Show this help message and exit.
For support please visit
https://github.com/boltgolt/howdy