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 Maxime Gauduin (Alucryd) - Saturday, 17 June 2023, 17:59 GMT
Opened by Max Pray (synthead) - Tuesday, 13 June 2023, 21:28 GMT
Last edited by Maxime Gauduin (Alucryd) - Saturday, 17 June 2023, 17:59 GMT
|
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
Closed by Maxime Gauduin (Alucryd)
Saturday, 17 June 2023, 17:59 GMT
Reason for closing: Fixed
Additional comments about closing: 2023.6.2-1
Saturday, 17 June 2023, 17:59 GMT
Reason for closing: Fixed
Additional comments about closing: 2023.6.2-1
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
FS#78413:) Was just pointing out the cause of the breakage..PS: fixed the link
This still fails the first run as before, but now with a different error, so even the official way is kinda crap, but at least we don't have to worry about deps and versions anymore, and the whole installation is now self-contained. Please try the new package and report back, it should work fine with existing installations, you should be able to delete the deps folder in /var/lib/hass afterwards as additional packages will be installed in the venv now.
Worked like a charm on my installation (at the first run)
Deleted /var/lib/hass/deps manually before installation