在终端中安装pip报错
Tofloor
poster avatar
azurestarry
deepin
2019-07-07 02:09
Author
安装命令:sudo apt install python3-pip

报错内容:

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: 处理软件包 python-idna (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python-setuptools (33.1.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: 处理软件包 python-setuptools (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python3-cffi-backend (1.9.1-2) ...
正在设置 gimp (2.8.18-1+deb9u1) ...
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: 处理软件包 gimp (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python3-crypto (2.6.1-7) ...
正在设置 python-pyasn1 (0.1.9-2) ...
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: 处理软件包 python-pyasn1 (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python3-idna (2.2-1) ...
正在设置 python3-xdg (0.25-4) ...
正在设置 python-wheel (0.29.0-2) ...
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: 处理软件包 python-wheel (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python3-keyrings.alt (1.3-1) ...
正在设置 python-bsddb3 (6.1.0-1+b2) ...
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: 处理软件包 python-bsddb3 (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python3-wheel (0.29.0-2) ...
正在设置 libpython3.5-dev:amd64 (3.5.3-1+deb9u1) ...
正在设置 python-keyrings.alt (1.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: 处理软件包 python-keyrings.alt (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python3-pyasn1 (0.1.9-2) ...
正在设置 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: 处理软件包 python-enum34 (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
dpkg: 依赖关系问题使得 python-cryptography 的配置工作不能继续:
python-cryptography 依赖于 python-enum34;然而:
  软件包 python-enum34 尚未配置。
python-cryptography 依赖于 python-idna (>= 2.0);然而:
  软件包 python-idna 尚未配置。
python-cryptography 依赖于 python-pyasn1 (>= 0.1.8);然而:
  软件包 python-pyasn1 尚未配置。
python-cryptography 依赖于 python-setuptools (>= 11.3);然而:
  软件包 python-setuptools 尚未配置。

dpkg: 处理软件包 python-cryptography (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 python3-pip (9.0.1-2) ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
正在设置 python3-setuptools (33.1.1-1) ...
正在设置 python3.5-dev (3.5.3-1+deb9u1) ...
正在设置 python-ipaddress (1.0.17-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: 处理软件包 python-ipaddress (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python-pip (9.0.1-2) ...
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: 处理软件包 python-pip (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 python-xdg (0.25-4) ...
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: 处理软件包 python-xdg (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在设置 libpython3-dev:amd64 (3.5.3-1) ...
dpkg: 依赖关系问题使得 python-secretstorage 的配置工作不能继续:
python-secretstorage 依赖于 python-cryptography;然而:
  软件包 python-cryptography 尚未配置。

dpkg: 处理软件包 python-secretstorage (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 python3-cryptography (1.7.1-3) ...
dpkg: 依赖关系问题使得 python-keyring 的配置工作不能继续:
python-keyring 依赖于 python-secretstorage;然而:
  软件包 python-secretstorage 尚未配置。

dpkg: 处理软件包 python-keyring (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 python3-dev (3.5.3-1) ...
正在设置 python3-secretstorage (2.3.1-2) ...
正在设置 python3-keyring (10.1-1) ...
在处理时有错误发生:
python-idna
python-setuptools
gimp
python-pyasn1
python-wheel
python-bsddb3
python-keyrings.alt
python-enum34
python-cryptography
python-ipaddress
python-pip
python-xdg
python-secretstorage
python-keyring
E: Sub-process /usr/bin/dpkg returned an error code (1)


本人刚转用Linux系统不久 求大佬指点

非常感谢!

Reply Favorite View the author
All Replies
avatar
走钢丝
deepin
2019-07-07 02:33
#1
不懂,不过我一般用另一种搞法:

  1. curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  2. sudo python get-pip.py
Copy the Code
Reply View the author
avatar
azurestarry
deepin
2019-07-07 03:31
#2
问题已解决

参考博文: dpkg: 处理软件包 xxx (--configure)时出错解决方法
链接:https://blog.csdn.net/jf_xu/article/details/82285008
Reply View the author
avatar
random0901
deepin
2019-07-07 04:45
#3
没有用apt安装,用的是pip官方的安装教程:
https://pip.pypa.io/en/stable/installing/
Reply View the author