Debian Sid s Pythonem 3.12 a dvě degradované služby

Debian Sid s Pythonem 3.12 a dvě degradované služby
« kdy: 28. 03. 2025, 13:12:45 »
Testuji Debian SID,
a uz je to asi tyden kdy systemd hlasi ze mam 2 procesy degradovane....
a nefunguje BT



Kód: [Vybrat]
sudo systemctl --failed
  UNIT                        LOAD   ACTIVE SUB    DESCRIPTION                   
● blueman-mechanism.service   loaded failed failed Bluetooth management mechanism
● unattended-upgrades.service loaded failed failed Unattended Upgrades Shutdown

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

2 loaded units listed.



Zkousim restart a status, ale konci to chybou,
a uz nevim co s tim ....

Kód: [Vybrat]
sudo systemctl restart blueman-mechanism.service
sudo systemctl status blueman-mechanism.service

blueman-mechanism[4242]:   File "/usr/libexec/blueman-mechanism", line 6, in <module>
blueman-mechanism[4242]:     from blueman.main.MechanismApplication import MechanismApplication
blueman-mechanism[4242]:   File "/usr/lib/python3/dist-packages/blueman/main/MechanismApplication.py", line 8, in <module>
blueman-mechanism[4242]:     from gi.repository import GLib, Gio
blueman-mechanism[4242]:   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 40, in <module>
blueman-mechanism[4242]:     from . import _gi
blueman-mechanism[4242]: ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/__init__.py)
systemd[1]: blueman-mechanism.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: blueman-mechanism.service: Failed with result 'exit-code'.
systemd[1]: Failed to start blueman-mechanism.service - Bluetooth management mechanism.




Kód: [Vybrat]
sudo systemctl restart unattended-upgrades.service
sudo systemctl status unattended-upgrades.service

unattended-upgrade-shutdown[4770]: Traceback (most recent call last):
unattended-upgrade-shutdown[4770]:   File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 29, in <module>
unattended-upgrade-shutdown[4770]:     import dbus
unattended-upgrade-shutdown[4770]:   File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 71, in <module>
unattended-upgrade-shutdown[4770]:     import dbus.types as types
unattended-upgrade-shutdown[4770]:   File "/usr/lib/python3/dist-packages/dbus/types.py", line 10, in <module>
unattended-upgrade-shutdown[4770]:     from _dbus_bindings import (
unattended-upgrade-shutdown[4770]: ModuleNotFoundError: No module named '_dbus_bindings'
systemd[1]: unattended-upgrades.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: unattended-upgrades.service: Failed with result 'exit-code'.




Protoze Python 3.13 je nova verze a potrebuji na systemu 3.12 mam nastaveno tohle:

Kód: [Vybrat]
~$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root       7 Jun 13  2023 /usr/bin/python -> python3
lrwxrwxrwx 1 root root      10 Mar 28 11:13 /usr/bin/python3 -> python3.12
-rwxr-xr-x 1 root root 8061624 Feb  5 01:31 /usr/bin/python3.12
lrwxrwxrwx 1 root root      34 Feb  5 01:31 /usr/bin/python3.12-config -> x86_64-linux-gnu-python3.12-config
-rwxr-xr-x 1 root root 6808112 Mar 13 14:29 /usr/bin/python3.13
lrwxrwxrwx 1 root root      34 Mar 13 14:29 /usr/bin/python3.13-config -> x86_64-linux-gnu-python3.13-config
lrwxrwxrwx 1 root root      17 Mar 22 22:19 /usr/bin/python3-config -> python3.12-config
-rwxr-xr-x 1 root root     263 Mar 25 18:05 /usr/bin/python-argcomplete-check-easy-install-script
-rwxr-xr-x 1 root root   14244 Nov 19 18:09 /usr/bin/python-mkdebian




~$ python -V;
Python 3.12.9

~$ python3.12 -V
Python 3.12.9

~$ python3.13 -V
Python 3.13.2

~$ pip -V;
pip 25.0.1 from /usr/lib/python3/dist-packages/pip (python 3.12)




Poradi nekdo kde je chyba a jak to opravit?














Re:Debian SID - Python3.12 a 2 degradovane procesy
« Odpověď #1 kdy: 28. 03. 2025, 15:00:23 »
To jako, že jste si ten symlink python3 znásilnil?

Co znamená potřebuju mít v systémy python3.12 ? Ten tam přeci může být vedle toho 3.13

zito@bobek:~$ python3 -V
Python 3.13.2
zito@bobek:~$ python3.12 -V
Python 3.12.9
zito@bobek:~$ python3.13 -V
Python 3.13.2

a jestli na něco potřebujete mít python3.12, tak do virtual env

zito@bobek:~$ python3.12 -mvenv /tmp/mypyth

zito@bobek:~$ . /tmp/mypyth/bin/activate
(mypyth) zito@bobek:~$ python3 -V
Python 3.12.9
(mypyth) zito@bobek:~$

Hrabat se někde do balíčkových souborů fakt není dobrý nápad, pokud opravdu nevíte co děláte.
Ve virtual env je možno doinstalovat balíčky libovolné..