~$ sudo apt-get install python-pip
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
python-pip 已经是最新的版本了。
升级了 个软件包,新安装了 个软件包,要卸载 个软件包,有 个软件包未被升级。
有 个软件包没有被完全安装或卸载。
解压缩后会消耗掉 B 的额外空间。
您希望继续执行吗? [Y/n] Y
正在设置 mercurial-common (2.8.-1ubuntu1.) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line , in <module>
from debpython.namespace import add_namespace_files
ImportError: No module named 'debpython.namespace'
dpkg: 处理软件包 mercurial-common (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号
dpkg: 依赖关系问题使得 mercurial 的配置工作不能继续:
mercurial 依赖于 mercurial-common (= 2.8.-1ubuntu1.);然而:
软件包 mercurial-common 尚未配置。 dpkg: 处理软件包 mercurial (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 python-colorama (0.2.-.1ubuntu2) ...
因为错误消息指示这是由于上一个问题导致的错误,没有写入 apport 报告。
Traceback (most recent call last):
File "/usr/bin/pycompile", line , in <module>
from debpython.namespace import add_namespace_files
ImportError: No module named 'debpython.namespace'
dpkg: 处理软件包 python-colorama (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号
正在设置 python-distlib (0.1.-1ubuntu1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line , in <module>
from debpython.namespace import add_namespace_files
ImportError: No module named 'debpython.namespace'
由于已经达到 MaxReports 限制,没有写入 apport 报告。
dpkg: 处理软件包 python-distlib (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号
正在设置 python-html5lib (0.999-~ubuntu1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line , in <module>
from debpython.namespace import add_namespace_files
ImportError: No module named 'debpython.namespace'
dpkg: 处理软件包 python-html5lib (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号
由于已经达到 MaxReports 限制,没有写入 apport 报告。
正在设置 python-setuptools (3.3-1ubuntu2) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line , in <module>
from debpython.namespace import add_namespace_files
ImportError: No module named 'debpython.namespace'
由于已经达到 MaxReports 限制,没有写入 apport 报告。
由于已经达到 MaxReports 限制,没有写入 apport 报告。
dpkg: 处理软件包 python-setuptools (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号
dpkg: 依赖关系问题使得 python-pip 的配置工作不能继续:
python-pip 依赖于 python-colorama;然而:
软件包 python-colorama 尚未配置。
python-pip 依赖于 python-distlib;然而:
软件包 python-distlib 尚未配置。
python-pip 依赖于 python-html5lib;然而:
软件包 python-html5lib 尚未配置。
python-pip 依赖于 python-setuptools (>= .6c1);然而:
软件包 python-setuptools 尚未配置。 dpkg: 处理软件包 python-pip (--configure)时出错:
依赖关系问题 - 仍未被配置
正在设置 python-wheel (0.24.-~ubuntu1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line , in <module>
from debpython.namespace import add_namespace_files
ImportError: No module named 'debpython.namespace'
dpkg: 处理软件包 python-wheel (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号
由于已经达到 MaxReports 限制,没有写入 apport 报告。
E: Sub-process /usr/bin/dpkg returned an error code ()

首先输入:

 sudo dpkg -C 

显示:

:~$ sudo dpkg -C
下列软件包已被解开,但是尚未配置。
要令它们运行正常,您必须借助 dpkg --configure
或者 dselect 菜单中的配置项:
python-pip alternative Python package installer
mercurial easy-to-use, scalable distributed version control system 下列软件包只是被不全面地配置了,这也许要归咎于
第一次配置它们时出的问题。您最好能重新配置它们。
借助 dpkg --configure <软件包名> 或者用 dselect
菜单中的配置项重新配置软件包:
python-distlib low-level components of python distutils2/packaging
mercurial-common easy-to-use, scalable distributed version control system
python-colorama Cross-platform colored terminal text in Python - Python
python-html5lib HTML parser/tokenizer based on the WHATWG HTML5 specifica
python-setuptools Python Distutils Enhancements
python-wheel built-package format for Python

分析:

原因是,我们在将python2.7升级到python3.3时,只是将/usr/local/bin目录下修改了(使用ln -s 或者其他),然而我们的配置目录并没有修改..

使用如下的方式可以有效的解决:

sudo apt-get clean
sudo apt-get update
sudo apt-get install --reinstall python-minimal python-lockfile

参考链接:http://askubuntu.com/questions/534040/problem-installing-any-new-packages-in-ubuntu-because-of-python

安装Python时遇到如下问题,解决方案的更多相关文章

  1. 安装 PostgreSQL 时丢失 libintl-8.dll 解决方案

     发表于 2013 年 11 月 13 日     修订于 2018 年 05 月 05 日 PostgreSQL 比 MySQL 有更多的高级特性,而且微信支付的数据库也是基于 PostgreSQL ...

  2. 【LoadRunner】安装LoadRunner时提示缺少vc2005_sp1_with_atl_fix_redist解决方案

    我的电脑在安装UFT时,被要求需要卸载本机上安装的LoadRunner11,当LoadRunner11被卸载后,进行重新安装LoadRunner11时,会报缺少vc2005_sp1_with_atl_ ...

  3. 安装LoadRunner时提示缺少vc2005_sp1_with_atl_fix_redist解决方案

    操作系统重装后,安装LoadRunner11时,会报缺少vc2005_sp1_with_atl_fix_redist错误,类似下图所示: LR自动安装失败,在网上下载此组件安装后依然提示此信息,最终解 ...

  4. 安装node-sass时出现的错误解决方案(Mac自用,也可以借鉴)

    安装node-sass时出现一下错误: gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir ...

  5. 安装Python时遇到的api-ms-win-crt-runtime-l1-1-0.dll 丢失问题

    api-ms-win-crt-runtime-l1-1-0.dll 丢失 电脑找不到api-ms-win-crt-runtime-l1-1-0.dll文件解决方法: 问题描述: 1.开机提示“api- ...

  6. 解决IDEA安装Python插件,下载失败的方法

    一.问题 通过file-->settings-->Plugins 安装python时,会提示下载失败.可以采用以下方法解决. 二.解决办法 1.在help/about中查看IDEA版本,作 ...

  7. Linux 下安装Python报错:zlib not available

    问题描述: 在Linux下安装Python时出现一个错误:zipimport.ZipImportError: can't decompress data; zlib not available 详细错 ...

  8. Python原来这么好学-1.1节: 在windows中安装Python

    这是一本教同学们彻底学通Python的高质量学习教程,认真地学习每一章节的内容,每天只需学好一节,帮助你成为一名卓越的Python程序员: 本教程面向的是零编程基础的同学,非科班人士,以及有一定编程水 ...

  9. 安装Mysql时提示尚未安装Python 解决方案

    我明明安装了python,结果在安装mysql是却提示没有安装python. 原因,没有将python添加到path中. 解决方法:卸载python,然后重装python,在安装界面中勾选将path添 ...

随机推荐

  1. android开发中难免遇到listview刷新数据出现异常

    异常:java.lang.IllegalStateException: The content of the adapter has changed but ListView did not rece ...

  2. HTML 字符图案

    Dog: <!-- :: :;J7, :, ::;7: ,ivYi, , ;LLLFS: :iv7Yi :7ri;j5PL ,:ivYLvr ,ivrrirrY2X, :;r@Wwz.7r: : ...

  3. Linux下PHP+MYSQL+APACHE配置方法

    apache: http://www.apache.org  mysql: http://www.mysql.com  php: http://www.php.net/downloads.php  g ...

  4. JS弹出浮层

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. sublime3添加对react代码检查

    安装eslint npm install -g eslint npm install -g eslint-plugin-react 安装完后调用eslint --init 初始化,生成.eslintr ...

  6. java源代码跟踪

    首先我们要学会的是将JDK源码加载Eclipse中. 1.点“窗口”——>"首选项",选择左边的"Java"——>"已安装的JRE&quo ...

  7. 在MAC服务器上搭建docker-registry(转)

    在MAC服务器上搭建docker-registry 2014-03-14      0个评论    来源:在MAC服务器上搭建docker-registry   收藏    我要投稿 本文介绍如何在M ...

  8. flume的使用

    1.flume的安装和配置 1.1 配置java_home,修改/opt/cdh/flume-1.5.0-cdh5.3.6/conf/flume-env.sh文件

  9. 客户端实现蓝牙接收(C#)

    知识总结发布  (转载) 网上有关蓝牙接收的资料很多,使用起来也很简单,但是我觉得还是有必要把这些知识总结下来,蓝牙开发需要用到一个第三方的库InTheHand.Net.Personal.dll,感兴 ...

  10. reactive-turtle

    reactive-turtle 标签(空格分隔): Scala Github 偶然在Github上看到一个有意思的小项目,一个粑粑教11岁的儿子学习scala,因为学习语法等太枯燥了,所以写了一个海龟 ...