Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78774 - [home-assistant] Unable to install package sqlalchemy==2.0.15: error: externally-managed-environment

Attached to Project: Arch Linux
Opened by Max Pray (synthead) - Tuesday, 13 June 2023, 21:28 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 13 June 2023, 22:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Maxime Gauduin (Alucryd)
Alexander Epaneshnikov (alex19EP)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Description:

When starting HA 1:2023.6.1-1, I see messages in /var/log/hass/home-assistant.log that look like this:

https://gist.githubusercontent.com/synthead/ec10aadcef974f734334c95aa8efb253/raw/121cd1cc09ff9130bfe44292e81cac0c95f582fc/gistfile1.txt

Here's the plain text so it's searchable here:

2023-06-13 13:41:33.255 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package sqlalchemy==2.0.15: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
python-xyz', where xyz is the package you are trying to
install.

If you wish to install a non-Arch-packaged Python package,
create a virtual environment using 'python -m venv path/to/venv'.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

If you wish to install a non-Arch packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have python-pipx
installed via pacman.

This appears to complain about these missing python libs at these specific versions:

- PyQRCode 1.2.1
- PyTurboJPEG 1.6.7
- fnv-hash-fast 0.3.1
- janus 1.0.0
- psutil-home-assistant 0.0.1
- pyotp 2.8.0
- sqlalchemy 2.0.15

Additionally, the deps/ directory doesn't seem to populate when HA is started. If I move this dir to deps.backup/ and restart HA via systemctl, the directory will be created with the correct permissions, but it will remain empty. It appears as if HA isn't installing the python libs, and is complaining about them not existing.

Additional info:
* home-assistant 1:2023.6.1-1

Steps to reproduce:

1. Install home-assistant
2. Start home-assistant.service via systemctl

Marking as critical in the scope of home-assistant because there is a problem that breaks HA on package upgrade. Feel free to adjust this if you feel that this is incorrect in some way.
This task depends upon

Comment by Toolybird (Toolybird) - Tuesday, 13 June 2023, 22:02 GMT
Yeah, currently it seems more horked than usual...
Comment by Toolybird (Toolybird) - Tuesday, 13 June 2023, 22:13 GMT
Actually, it seems to be caused by new python-3.11.3-2. Downgrading back to python-3.11.3-1 makes hass start up properly...
Comment by Max Pray (synthead) - Tuesday, 13 June 2023, 22:21 GMT
Can confirm! Downgrading to python-3.11.3-1 also makes it work here, too.
Comment by loqs (loqs) - Tuesday, 13 June 2023, 22:37 GMT
What if you add --skip-pip to the /usr/bin/hass invocation in home-assistant.service does it then just fail due to version mismatches?
Comment by Christian Heusel (gromit) - Tuesday, 13 June 2023, 22:44 GMT
@Toolybird, that is by design and a very nice feature of python-3.11.3-2 imo.
See https://lists.archlinux.org/archives/list/arch-general%40lists.archlinux.org/thread/7V7IE2KT2Z75CTTABQIYHFXVXKKBDS5N/ for some background about PEP668

How this package can be fixed however is a totally different question :p

Edit: okay, something is borked about the link, but only in the preview :P
Comment by Toolybird (Toolybird) - Tuesday, 13 June 2023, 23:07 GMT
@gromit, I'm well aware of  FS#78413  :) Was just pointing out the cause of the breakage..

PS: fixed the link

Loading...