소프트웨어를 시작하고 업데이트하는 데 문제가 있습니다(Ubuntu 22.04).
시스템 로그:
Aug 22 11:07:03 maskalev-Aspire-A514-54 systemd[3327]: Started Application launched by gnome-shell.
Aug 22 11:07:04 maskalev-Aspire-A514-54 dbus-daemon[817]: [system] Activating service name='com.ubuntu.SoftwareProperties' requested by ':1.190' (uid=1000 pid=14929 comm="/usr/bin/python3 /usr/bin/software
-properties-gtk " label="unconfined") (using servicehelper)
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: Traceback (most recent call last):
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/launchpadlib/launchpad.py", line 34, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from httplib2 import proxy_info_from_environment
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/httplib2/__init__.py", line 52, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from . import auth
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/httplib2/auth.py", line 4, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: import pyparsing as pp
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: ModuleNotFoundError: No module named 'pyparsing'
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: During handling of the above exception, another exception occurred:
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: Traceback (most recent call last):
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/usr/lib/software-properties/software-properties-dbus", line 29, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from softwareproperties.dbus.SoftwarePropertiesDBus import (
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/softwareproperties/dbus/SoftwarePropertiesDBus.py", line 32, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from softwareproperties.SoftwareProperties import SoftwareProperties
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 64, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from softwareproperties.shortcuts import shortcut_handler
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 23, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from softwareproperties.ppa import PPAShortcutHandler
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/softwareproperties/ppa.py", line 25, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from launchpadlib.launchpad import Launchpad
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/launchpadlib/launchpad.py", line 36, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from httplib2 import ProxyInfo
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/httplib2/__init__.py", line 52, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: from . import auth
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: File "/lib/python3/dist-packages/httplib2/auth.py", line 4, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: import pyparsing as pp
Aug 22 11:07:04 maskalev-Aspire-A514-54 com.ubuntu.SoftwareProperties[14940]: ModuleNotFoundError: No module named 'pyparsing'
Aug 22 11:07:04 maskalev-Aspire-A514-54 dbus-daemon[817]: [system] Activated service 'com.ubuntu.SoftwareProperties' failed: Launch helper exited with unknown return code 1
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: Traceback (most recent call last):
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: return self.get_name_owner(bus_name)
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: reply_message = self.send_message_with_reply_and_block(
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'com.ubuntu.SoftwareProperties': no such name
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: During handling of the above exception, another exception occurred:
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: Traceback (most recent call last):
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/bin/software-properties-gtk", line 100, in <module>
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 210, in __init__
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: proxy = bus.get_object("com.ubuntu.SoftwareProperties", "/")
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: return self.ProxyObjectClass(self, bus_name, object_path,
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: self._named_service = conn.activate_name_owner(bus_name)
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: self.start_service_by_name(bus_name)
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: reply_message = self.send_message_with_reply_and_block(
Aug 22 11:07:04 maskalev-Aspire-A514-54 software-properties-gtk.desktop[14929]: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
Python에 문제가 있는 것 같습니다(경로, 버전 등).
maskalev@maskalev-Aspire-A514-54:~$ pip install pyparsing
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyparsing in ./.local/lib/python3.10/site-packages (3.0.9)
maskalev@maskalev-Aspire-A514-54:~$ python3 -c "import sys; print(sys.path)"
['', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/maskalev/.local/lib/python3.10/site-packages', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages']
maskalev@maskalev-Aspire-A514-54:~$ whereis python3
python3: /usr/bin/python3 /usr/lib/python3 /etc/python3 /usr/share/python3 /usr/share/man/man1/python3.1.gz
maskalev@maskalev-Aspire-A514-54:~$ ls /usr/bin/python*
/usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.10-config /usr/bin/python3.11-config /usr/bin/python3-futurize /usr/bin/python-dotenv
/usr/bin/python2.7-config /usr/bin/python3.10 /usr/bin/python3.11 /usr/bin/python3-config /usr/bin/python3-pasteurize
어떤 제안이라도 기꺼이 받아들이겠습니다. 요청 시 추가 정보를 보내드리겠습니다.
답변1
로컬 사용자 설치는 시스템 소프트웨어와 아무 관련이 없습니다. pip를 사용하여 시스템 전체 Python 패키지를 설치할 수 없습니다.
Ubuntu는 소프트웨어 센터를 이 패키지에 종속시키기 때문에 눈치 채지 못한 채 어떻게든 패키지(또는 그 내용만?)를 제거 python3-pyparsing
해야 합니다 . 당신이 이 문제를 해결하려고 한다는 사실을 보면 어딘가에서 비슷한 일을 하여 시스템이 고장난 것 같은 느낌이 듭니다. 그러면 도중에 더 많은 문제가 발생할 가능성이 높습니다. pyparsing을 제거해도 다른 중요한 모듈도 제거되지는 않을 것입니다. 실제로 시스템에서 사용되는 실행 파일을 덮어쓰고 있는 것일까요 ?dpkg
apt
pip
sudo pip uninstall
python3
즉각적인 문제를 해결하려고 시도할 수 있지만 여러 버전의 Python이 경로를 엉망으로 만드는 것에 대해 걱정할 것입니다. 그리고 시스템 전반에 걸쳐 설치를 혼합하여 정리하기 지루한 방식으로 중단시키고 있다고 sudo apt-get reinstall python3-pyparsing
생각한다면 걱정할 것입니다. pip
, 당신의가장 빠른해결책은 사용자의 홈페이지를 저장하고 Ubuntu를 재설정하는 것일 수 있습니다. 실제로 투자한 시간에 따라 성공 여부가 달라질 수 있습니다.
¹내가 설명한 내용이 바로 이것이다.여기그리고여기, 이는 pip
시스템에 특정 Python 모듈의 특정 버전이 필요하다는 사실을 모르고 시스템을 손상시킵니다.