howdy icon indicating copy to clipboard operation
howdy copied to clipboard

howdy fails to install with pip externally-managed-environment

Open rayzorben opened this issue 1 year ago • 7 comments

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 installatio n 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 ex it 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)

rayzorben avatar Apr 03 '23 18:04 rayzorben

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Lunar Lobster (development branch) Release: 23.04 Codename: lunar

wangyuhuiever avatar Apr 07 '23 01:04 wangyuhuiever

You can disable the externally-managed-environment (it is improved in the latest version of python). rename -this file /usr/lib/python3.x/EXTERNALLY-MANAGED and after install howdy.

etx2 avatar Apr 08 '23 18:04 etx2

I am also seeing the above on Debian bookworm. Temporarily moving away /usr/lib/python3.11/EXTERNALLY-MANAGED helped "fix" the problem (but bear in mind that this clearly feels like the "wrong" way to fix it when pip is actually provided by the system).

(I got dlib-related errors after "fixing" this, #726)

perlun avatar Apr 20 '23 07:04 perlun

I am also seeing the above on Debian bookworm. Temporarily moving away /usr/lib/python3.11/EXTERNALLY-MANAGED helped "fix" the problem (but bear in mind that this clearly feels like the "wrong" way to fix it when pip is actually provided by the system).

(I got dlib-related errors after "fixing" this, #726)

Yes, I know it is the wrong way to workaround the problem but I don t understand how can we use python in "virtual ambient" with howdy

etx2 avatar Apr 20 '23 09:04 etx2

I am using Ubuntu 23.04, python 3.11 Any good non workaround fix for this?

CodeOn-ArK avatar Apr 21 '23 07:04 CodeOn-ArK

I have the same issue after upgrading Ubuntu 22.10 to 23.04. It would be great to have permanent solution.

raknerak avatar Apr 24 '23 15:04 raknerak

Same installation error on 24.04 Noble:

# sudo apt install howdy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  nvidia-cuda-dev
The following NEW packages will be installed
  howdy
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/38.9 kB of archives.
After this operation, 166 kB of additional disk space will be used.
Selecting previously unselected package howdy.
(Reading database ... 295958 files and directories currently installed.)
Preparing to unpack .../archives/howdy_2.6.1_all.deb ...
Starting IR camera check...

Trying "Integrated Camera: Integrated C"
One of your cameras should now be on.
Did your IR emitters turn on? [y/N]: y

Starting certainty auto config...


After detection, Howdy knows how certain it is that the match is correct.
How certain Howdy needs to be before authenticating you can be customized.

F: Fast.
Allows more fuzzy matches, but speeds up the scanning process greatly.

B: Balanced.
Still relatively quick detection, but might not log you in when further away.

S: Secure.
The safest option, but will take much longer to authenticate you.

You can always change this setting in the config.
What profile would you like to use? [f/b/s]: f

Unpacking howdy (2.6.1) ...
Setting up howdy (2.6.1) ...
/var/lib/dpkg/info/howdy.postinst:145: SyntaxWarning: invalid escape sequence '\w'
  "davisking-dlib-\w+/(dlib/(http_client|java|matlab|test/)|"

>>> 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.12/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.12.0-4build2) ...
Errors were encountered while processing:
 howdy
E: Sub-process /usr/bin/dpkg returned an error code (1)

fenollp avatar Jul 17 '24 09:07 fenollp