~$ sudo apt-get install python-pip

正在读取软件包列表... 完成

正在分析软件包的依赖关系树

正在读取状态信息... 完成

python-pip 已经是最新的版本了。

升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 233 个软件包未被升级。

有 8 个软件包没有被完全安装或卸载。

解压缩后会消耗掉 0 B 的额外空间。

您希望继续执行吗? [Y/n] Y

正在设置 mercurial-common (2.8.2-1ubuntu1.3) ...

Traceback (most recent call last):

File "/usr/bin/pycompile", line 38, in

from debpython.namespace import add_namespace_files

ImportError: No module named 'debpython.namespace'

dpkg: 处理软件包 mercurial-common (--configure)时出错:

子进程 已安装 post-installation 脚本 返回了错误号 1

dpkg: 依赖关系问题使得 mercurial 的配置工作不能继续:

mercurial 依赖于 mercurial-common (= 2.8.2-1ubuntu1.3);然而:

软件包 mercurial-common 尚未配置。

dpkg: 处理软件包 mercurial (--configure)时出错:

依赖关系问题 - 仍未被配置

正在设置 python-colorama (0.2.5-0.1ubuntu2) ...

因为错误消息指示这是由于上一个问题导致的错误,没有写入 apport 报告。

Traceback (most recent call last):

File "/usr/bin/pycompile", line 38, in

from debpython.namespace import add_namespace_files

ImportError: No module named 'debpython.namespace'

dpkg: 处理软件包 python-colorama (--configure)时出错:

子进程 已安装 post-installation 脚本 返回了错误号 1

正在设置 python-distlib (0.1.8-1ubuntu1) ...

Traceback (most recent call last):

File "/usr/bin/pycompile", line 38, in

from debpython.namespace import add_namespace_files

ImportError: No module named 'debpython.namespace'

由于已经达到 MaxReports 限制,没有写入 apport 报告。

dpkg: 处理软件包 python-distlib (--configure)时出错:

子进程 已安装 post-installation 脚本 返回了错误号 1

正在设置 python-html5lib (0.999-3~ubuntu1) ...

Traceback (most recent call last):

File "/usr/bin/pycompile", line 38, in

from debpython.namespace import add_namespace_files

ImportError: No module named 'debpython.namespace'

dpkg: 处理软件包 python-html5lib (--configure)时出错:

子进程 已安装 post-installation 脚本 返回了错误号 1

由于已经达到 MaxReports 限制,没有写入 apport 报告。

正在设置 python-setuptools (3.3-1ubuntu2) ...

Traceback (most recent call last):

File "/usr/bin/pycompile", line 38, in

from debpython.namespace import add_namespace_files

ImportError: No module named 'debpython.namespace'

由于已经达到 MaxReports 限制,没有写入 apport 报告。

由于已经达到 MaxReports 限制,没有写入 apport 报告。

dpkg: 处理软件包 python-setuptools (--configure)时出错:

子进程 已安装 post-installation 脚本 返回了错误号 1

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 (>= 0.6c1);然而:

软件包 python-setuptools 尚未配置。

dpkg: 处理软件包 python-pip (--configure)时出错:

依赖关系问题 - 仍未被配置

正在设置 python-wheel (0.24.0-1~ubuntu1) ...

Traceback (most recent call last):

File "/usr/bin/pycompile", line 38, in

from debpython.namespace import add_namespace_files

ImportError: No module named 'debpython.namespace'

dpkg: 处理软件包 python-wheel (--configure)时出错:

子进程 已安装 post-installation 脚本 返回了错误号 1

由于已经达到 MaxReports 限制,没有写入 apport 报告。

E: Sub-process /usr/bin/dpkg returned an error code (1)

首先输入:

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 2

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遇到错误_安装Python时遇到如下问题,解决方案相关推荐

  1. python卸载错误_卸载python后导致yum无法使用的解决办法 - Python - 服务器之家

    卸载python后导致yum无法使用的解决办法 发布时间:2014-08-03 来源:服务器之家 由于服务器需要升级python,参照了一篇坑爹的文章卸载了旧版python # 卸载旧的python ...

  2. 安装mysql出现错误_安装Mysql时出现错误及解决办法

    因为一时手痒痒更新了一下驱动,结果导致无线网卡出了问题.然而就算是从官网上下载了驱动各种折腾也没有弄好,心里特别堵.无奈只有重装系统这一条路了.这里表示特别难过,因为电脑上东西实在太多了,而且各种环境 ...

  3. python 段错误_在Python中导入模块时出现分段错误

    我有一个Python脚本,它使用自然语言日期解析器Natty.Natty本身是用Java编写的,但在Python中使用Jpype进行了包装.脚本在我的开发机器上运行得非常好,但是在生产机器上抛出了一个 ...

  4. python module错误_修复python的ModuleNotFoundError

    我在项目里面用到了python,但其他的同事并没有安装python环境,为了不强制每个人都安装python,我下载了python-3.6.1-embed-amd64,并将用一个.bat去调用它.大概像 ...

  5. java安装未指定的错误_安装redistributable(x64)出现0x80240017未指定的错误

    PA 创建日期 2015/12/08 安装redistributable(x64)出现0x80240017未指定的错误 日志文件 [18E4:0748][2015-12-09T04:00:09]i00 ...

  6. Python3安装turtle提示错误:Command python setup.py egg_info failed with error code 1

    Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1 Python3.5安 ...

  7. python 概率分布模型_使用python的概率模型进行公司估值

    python 概率分布模型 Note from Towards Data Science's editors: While we allow independent authors to publis ...

  8. 安装vmware workstations 的时候 在virtual network editor 的时候停下了 安装,卸载或重装Vmware Workstation时失败的官方解决方案

    9. Re: Can't install Workstation Pro 12 because of virtual network driver helpfuluser 2016-1-23 上午2: ...

  9. python 时间序列预测_使用Python进行动手时间序列预测

    python 时间序列预测 Time series analysis is the endeavor of extracting meaningful summary and statistical ...

最新文章

  1. Scrapy框架的入门使用
  2. el-tree设置某节点不能折叠_如何设置动画角色
  3. ShopEx安装过程
  4. jsp 构建单页应用_如何使用服务器端Blazor构建单页应用程序
  5. Jzoj4743 积木
  6. python实现表格_Python 自由定制表格的实现示例
  7. 异常:Invalid or unexpected token
  8. 什么水平的java工程师月薪3万起?
  9. C# 图解教程 第一章 C#和.NET框架
  10. 利用 SQL Monitor 查看语句运行状态步骤
  11. java mdb连接_[Java]如何连接一个带密码的mdb文件?
  12. Pocket PC、Pocket PC phone、Smartphone的区别
  13. 爬虫技术(02)神箭手爬虫实时API
  14. 【计算思维题】少儿编程 蓝桥杯青少组计算思维题真题及解析第2套
  15. PCL代码学习03-kdtree_search
  16. DSF data model
  17. 无机物及有机物储氢材料/MNi4.8Sn0.2(M=La,Nd)合金粒子负载纳米碳管复合储氢材料/LaNi4.8Sn0.2/CNTs纳米碳管复合储氢材料
  18. 【亲测】RMI之Hassion
  19. symbian与uiq开发教程[完整版]
  20. 电脑黑屏但可以打开任务管理器

热门文章

  1. [网络编程] - MIME格式详细介绍[转]
  2. 解析Json的格式.
  3. 【Vue】路由Router嵌套的实现及经典案例
  4. Scope(作用域)
  5. Cycle-1(循环)
  6. 三角形数、五边形数和六角形数
  7. 关于request.getServletPath(),request.getContextPath()的总结
  8. String 和 StringBuffrer 的区别
  9. java 获取网卡信息_java 使用 java.net.InterfaceAddress 获取网卡信息
  10. comsol 超声声场模拟_新品上市 | COMSOL 物理仿真软件全新发布5.6 版本并推出四个新模块...