Errors were encountered while processing python

Че, dpkg до сих пор болеет?

В очередной раз после ребута заглючила Малина. На этот раз что-то с Питоном, который нужен для моих задач.

Что ни пробовал, получаю одну и ту же хрень:

root@pi:/# apt purge python3 Reading package lists. Done Building dependency tree Reading state information. Done The following packages were automatically installed and are no longer required: libmpdec2 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib python-pip-whl python3-minimal python3.7 python3.7-minimal Use 'apt autoremove' to remove them. The following packages will be REMOVED: dh-python* python3* python3-distutils* python3-lib2to3* python3-pip* python3-pkg-resources* python3-setuptools* 0 upgraded, 0 newly installed, 7 to remove and 37 not upgraded. 9 not fully installed or removed. After this operation, 4,346 kB disk space will be freed. Do you want to continue? [Y/n] y Segmentation fault (Reading database . 30574 files and directories currently installed.) Removing dh-python (3.20190308) . Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' Current thread 0x76f64ad0 (most recent call first): Aborted dpkg: error processing package dh-python (--remove): installed dh-python package pre-removal script subprocess returned error exit status 134 Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' Current thread 0x76f6aad0 (most recent call first): Aborted dpkg: error while cleaning up: installed dh-python package post-installation script subprocess returned error exit status 134 Removing python3-pip (18.1-5+rpt1) . Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' Current thread 0x76fcaad0 (most recent call first): Aborted dpkg: error processing package python3-pip (--remove): installed python3-pip package pre-removal script subprocess returned error exit status 134 Removing python3-setuptools (40.8.0-1) . Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' Current thread 0x76fdfad0 (most recent call first): Aborted dpkg: error processing package python3-setuptools (--remove): installed python3-setuptools package pre-removal script subprocess returned error exit status 134 dpkg: python3-distutils: dependency problems, but removing anyway as you requested: python3-setuptools depends on python3-distutils; however: Package python3-distutils is to be removed. python3-pip depends on python3-distutils. dh-python depends on python3-distutils | python3 ( 

Да насрать мне что у меня с Питоном. Я просто хочу его удалить используя стандартный пакетный менеджер операционной системы. Вызывать питон чтобы удалить питон могут додуматься только дебилыановцы

Пост - не о том, что мне делать. Разбираться влом, завтра просто накачу образ с нуля. Пост - удивление тому, что Дебиан до сих пор болеет детскими болезнями класса «не могу удалить глючную программу потому что она глючит».

Источник

Ошибки в пакетах.

Возникла проблема в пайтонивських пакетах. После выполнения команды sudo apt-get install -f получаю ошибки:

 Processing triggers for libc-bin (2.24-9ubuntu2.2) . Errors were encountered while processing: python-idna python-simplejson python-isort python-setuptools python-lazr.restfulclient python-functools32 . очень много пакетов . python-psutil python-pyflakes python-lazr.uri python-enum34 python-lxml python-cairo 

Прокрути выше, там должны быть конкретные сообщения об ошибках.

Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-bs4 (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-zope.interface (4.3.2-1) . No apport report written because MaxReports is reached already Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-zope.interface (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up python-psutil (5.0.1-1) . Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-psutil (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up python-pyflakes (1.3.0-1) . Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-pyflakes (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up python-lazr.uri (1.0.3-2build1) . Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-lazr.uri (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up python-enum34 (1.1.6-1) . Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-enum34 (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up python-lxml (3.7.3-1) . Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-lxml (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up python-cairo (1.8.8-2.1) . Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-cairo (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already dpkg: error processing package apport (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration No apport report written because MaxReports is reached already dpkg: too many errors, stopping 

У тебя питон битый. ConfigParser это из стандартной библиотеки.

А что ты вообще с ним делал, после чего всё это началось?

проверь какая версия по-умолчанию

ln -sf python2 /usr/bin/python

Источник

Linux Mint Forums

Errors were encountered while processing: python3-psutil and more

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Errors were encountered while processing: python3-psutil and more

Post by Phicksur » Sun Aug 06, 2017 10:45 pm

Extracting templates from packages: 100% Preconfiguring packages . Setting up python3-psutil (3.4.2-1) . Traceback (most recent call last): File "/usr/bin/py3compile", line 290, in main() File "/usr/bin/py3compile", line 270, in main options.force, options.optimize, e_patterns) File "/usr/bin/py3compile", line 156, in compile cfn = interpreter.cache_file(fn, version) File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file (fname[:-3], self.magic_tag(version), last_char)) File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag return self._execute('import imp; print(imp.get_tag())', version) File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute raise Exception('<> failed with status code <>'.format(command, output['returncode'])) Exception: python3.5 -c 'import imp; print(imp.get_tag())' failed with status code 1 dpkg: error processing package python3-psutil (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python3-xapp: python3-xapp depends on python3-psutil; however: Package python3-psutil is not configured yet. dpkg: error processing package python3-xapp (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python3-psutil python3-xapp E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up python3-psutil (3.4.2-1) . Traceback (most recent call last): File "/usr/bin/py3compile", line 290, in main() File "/usr/bin/py3compile", line 270, in main options.force, options.optimize, e_patterns) File "/usr/bin/py3compile", line 156, in compile cfn = interpreter.cache_file(fn, version) File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file (fname[:-3], self.magic_tag(version), last_char)) File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag return self._execute('import imp; print(imp.get_tag())', version) File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute raise Exception('<> failed with status code <>'.format(command, output['returncode'])) Exception: python3.5 -c 'import imp; print(imp.get_tag())' failed with status code 1 dpkg: error processing package python3-psutil (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python3-xapp: python3-xapp depends on python3-psutil; however: Package python3-psutil is not configured yet. dpkg: error processing package python3-xapp (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of mintupdate: mintupdate depends on python3-xapp (>= 1.0.1); however: Package python3-xapp is not configured yet. dpkg: error processing package mintupdate (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python3-psutil python3-xapp mintupdate 

If I am reading this correctly, Python3 isn't properly installed, but I can't seem to repair it. Can someone provide me with assistance on repairing it so I can perform an update?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Re: Errors were encountered while processing: python3-psutil and more

Post by Phicksur » Tue Aug 08, 2017 4:17 am

Ok, seriously, whatever this problem is no one seems to know anything about it. I have been searching the internet and have had crap-all luck trying to repair this.

Any assistance would be helpful.

Exception: python3.5 -c 'import imp; print(imp.get_tag())' failed with status code 1 dpkg: error processing package python3-psutil (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python3-xapp: python3-xapp depends on python3-psutil; however: Package python3-psutil is not configured yet. dpkg: error processing package python3-xapp (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of mintupdate: mintupdate depends on python3-xapp (>= 1.0.1); however: Package python3-xapp is not configured yet. 

Источник

Читайте также:  Php mbstring enable ubuntu
Оцените статью