~$ 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. Mono.Ceil 无法保存Silverlight 程序集

    一句话: 处理Silverlight程序集之前, 须先移除强名称(StrongNameRemoveHelper), 之后Reflexil 即可一如预期的正常工作.

  2. VB 中 NumericUpDown 控件 如何为手动输入设定触发事件

    Private Sub numDuration_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) ...

  3. 基于Clang的Source to Source源代码转换(一)

    Clang中包含了非常多的关于抽象语法树(AST)的访问和操作的类和接口.我们程序开发人员可以直接通过继承其中的某些类,重写其中的关键成员方法,从而形成我们自己的对抽象语法树的操作. 那么,首先我们简 ...

  4. delphi强制WebBrowser控件使用指定版本显示网页

    function TFrmmain.WriteAppNameToReg:Boolean; var reg:TRegistry; sPath,sAppName:String; Sver:string; ...

  5. jquery常用总结

    1.遍历对象 n是属性 value是对应的值 $.each(param,function(n,value) { datas[n] = value; }); 2.获取select改变后的值 $('sel ...

  6. ABAP代码编辑器设置--界线

    ABAP编辑器每行允许的最大字符数: Utilities->Settings打开选项卡: 勾选:Downward-Compat.line Length(72) 设置后看到的效果: 设置步骤:

  7. ELK初步实践

    ELK是一个日志分析和统计框架,是Elasticsearch.Logstash和Kibana三个核心开源组件的首字母缩写,实践中还需要filebeat.redis配合完成日志的搜集. 组件一览 名称 ...

  8. windows系统中WIN键的快捷组合

    1.WIN+E    打开我的电脑(计算机) 2.WIN+D      返回桌面 当你在用聊天工具与朋友聊天时,旁边突然出现某位小伙伴,快速按下WIN+D返回到桌面就可以很好的保护你的聊天内容啦! 3 ...

  9. Mifare系列3-卡的能源和数据传递(转)

    文/闫鑫原创转载请注明出处http://blog.csdn.net/yxstars/article/details/38080175 在MIFARE卡中,能量和数据通过天线传输,卡中天线为几匝线圈,直 ...

  10. session、cookie

    session:全局变量组 存放位置:存放在服务器上 用法:相当于一个变量的使用方法,存在于服务器内存上,抓取速度快 主界面: using System; using System.Collectio ...