推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Mrkon
V2EX  ›  Python

手贱卸载了系统(Ubuntu)自带的 python3.5

  •  3
     
  •   Mrkon · Jun 5, 2018 · 13797 views
    This topic created in 3079 days ago, the information mentioned may be changed or developed.
    今天为了安装 python3.6,然后脑子抽了,卸载了 python3.5 ( sudo apt autoremove python3.5 )...
    然后...控制台直接乱码,估计重启之后可能进不了桌面了。
    查找了解决办法 :
    sudo apt-get install ubuntu-minimal ubuntu-standard ubuntu-desktop

    sudo reboot #重启
    但是,出现依赖问题:无法修正。。,因。。要求某些。。件保持现状,就是它破坏了。。的依赖
    求帮助!挺急的。
    Supplement 1  ·  Jun 5, 2018
    问题已解决,一下是操作步骤,希望对大家有用
    操作步骤:
    1.冷静一点,备份数据,解决问题并不难。
    2.安装 python3.5 ( sudo apt-get install python3.5 )会出现依赖问题,我的报错为 python3.5-minimal 等正在安装,卸载掉正在安装的包( sudo apt-get autoremove python3.5-minimal ).再安装 python3.5 能够成功
    3.重新安装 Ubuntu
    ( sudo aptitude install ubuntu-minimal ubuntu-standard ubuntu-desktop )中间会出现依赖错误,根据提示和上面个一样先卸载,再安装
    4.sudo reboot #重启
    22 replies  •  2020-04-13 10:45:09 +08:00
    vansl
    vansl
    Jun 5, 2018 via iPhone
    1
    centos 有救援模式,Ubuntu 应该也有类似的吧
    zhjits
    zhjits
    Jun 5, 2018
    2
    sudo apt install -f 试一下
    Mrkon
    Mrkon
    OP
    Jun 5, 2018
    3
    @zhjits 没有成功,0 个安装包,难受。
    cstj0505
    cstj0505
    Jun 5, 2018
    4
    用 debian 一上午删过两次 kde,也是删除 python。
    只能说 linux 删除桌面不是什么大事,命令行备份好数据慢慢解决吧。
    时间紧张就另说了
    likuku
    likuku
    Jun 5, 2018
    5
    备份好数据,覆盖安装吧。

    再论 pyenv 等的重要性。
    Nick66
    Nick66
    Jun 5, 2018
    6
    这个跟我之前一样,apt-get 安装软件都报错,各种依赖问题,最后出现安装系统
    aocif23
    aocif23
    Jun 5, 2018 via Android
    7
    修复 linux 应该用 livecd 和 chroot 吧
    mseasons
    mseasons
    Jun 5, 2018
    8
    我上次也是卸载了 python3.5 然后重装系统了……
    PigRinpoche
    PigRinpoche
    Jun 5, 2018 via Android
    9
    重装效率最高吧
    Danic
    Danic
    Jun 5, 2018
    10
    重装+1
    chaleaochexist
    chaleaochexist
    Jun 5, 2018
    11
    python3.6 有 bug.
    还是用 3.5 比较稳妥.

    我有一个应用用 3.6 报错.
    3.5 就没问题.
    wwqgtxx
    wwqgtxx
    Jun 5, 2018❤️2
    12
    @chaleaochexist 一般这只能说明你的那个应用写的有些问题,也可能是你用的某个 API 已经更改了,要是有 bug 一般不会都 3.6.5 还没修好
    gaolycn
    gaolycn
    Jun 5, 2018❤️1
    13
    @chaleaochexist 整个 python3 一直有 bug.
    还是用 2 比较稳妥.

    我有一个应用用 3 报错.
    2 就没问题.
    dychenyi
    dychenyi
    Jun 5, 2018
    14
    这其实可以说是 linux 弱智的地方。和 MS 比简直就是小儿科。
    centos7 最新版曾经出现过同样的问题。安装时候选了开发人员选项,装了一堆我不用的 java,还有旧版本 qt,我后来删除了,进不了系统。然后我不折腾,重装了。
    crb912
    crb912
    Jun 5, 2018❤️1
    15
    @gaolycn 这话说的,“我有一个应用用 3 报错. ” ,然后就归结为,“ 整个 python3 一直有 bug. ” 了。 为什么不想想 Python2 与 Python3 的兼容性呢? Python3 本来就有很多不同于 Pyhon2 了。你的代码不去为 Py3 做适配,不可能不报错。找找报错的原因吧, 除非你能证明是 Python3 自身的缺陷,否则就是你自己的代码没有遵循 Pyhon3 的语法。
    codeeer
    codeeer
    Jun 5, 2018 via iPhone
    16
    @chaleaochexist python 有 bug,php 比较稳妥
    gaolycn
    gaolycn
    Jun 5, 2018 via Android
    17
    @crb912 你好认真啊,没看到我前面的 @吗
    crb912
    crb912
    Jun 5, 2018
    18
    @gaolycn。。
    orm
    orm
    Jun 5, 2018 via iPhone
    19
    @chaleaochexist 试试 pylint,也许你的代码规范问题
    tempdban
    tempdban
    Jun 5, 2018 via Android
    20
    aptitude
    lhymath
    lhymath
    Apr 13, 2020
    21
    @tempdban 通过 aptitude 安装可以修复
    tempdban
    tempdban
    Apr 13, 2020
    22
    @lhymath 这是挖了一手坟?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4076 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 72ms · UTC 06:57 · PVG 14:57 · LAX 22:57 · JFK 01:57
    ♥ Do have faith in what you're doing.