在Raspberry Pi上,我安装了一些python软件,一个带有pip的部件,还有一些带有apt的部件。所以我现在的情况是,有一些打包等待安装,假设python 3.5和其他2.7,这会导致某种类型的死锁,我看不出有什么出路。
无论我接触什么软件apt-get,现在我都会遇到以下错误:
Setting up python-crypto (2.6.1-7) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
`enter code here` from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-crypto (--configure):
subprocess installed post-installation script returned error exit status 1我怎么才能解决这个问题?
apt-获得清洁,自动清洁,清除什么都不做,因为上面说的软件不存在于armhf中(这就是为什么我试图用pip安装它)。pip uninstall什么也不做,因为它认为库根本没有安装。
pi@raspberrypi ~> sudo apt-get install python-wheel
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-wheel is already the newest version (0.29.0-2).
python-wheel set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up python-crypto (2.6.1-7) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-crypto (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-wheel (0.29.0-2) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wheel (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-gi (3.22.0-2) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-gi (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-dbus (1.2.4-1) ...
Remove stale byte-compiled files...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-dbus (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-pip (9.0.1-2+rpt2) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pip (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-secretstorage:
python-secretstorage depends on python-dbus; however:
Package python-dbus is not configured yet.
dpkg: error processing package python-secretstorage (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-keyring:
python-keyring depends on python-dbus; however:
Package python-dbus is not configured yet.
python-keyring depends on python-secretstorage; however:
Package python-secretstorage is not configured yet.
dpkg: error processing package python-keyring (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-crypto
python-wheel
python-gi
python-dbus
python-pip
python-secretstorage
python-keyring
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2019-03-29 19:46:21
我不得不将我的系统python链接回python2.7。显然,我把它改为python3.5,这导致了这个错误。
https://askubuntu.com/questions/1129411
复制相似问题