如何在 Ubuntu 16.04 上完全卸载 python 2.7.13 [英] How to completely uninstall python 2.7.13 on Ubuntu 16.04

查看:272
本文介绍了如何在 Ubuntu 16.04 上完全卸载 python 2.7.13的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我根据 本指南,并成为版本 2.7.12 的默认版本.但是,我想完全删除 Python 2.7.13 并返回到 version 2.7.12 作为默认版本,因为 pip 命令执行不适用于以下错误.

I installed Python 2.7.13 on Ubuntu 16.04 according to this guide, and it became the default version as an alternative to the version 2.7.12. But, I wanted to completely remove Python 2.7.13 and return back to the version 2.7.12 as the default version since the pip command does not work with the following error.

bash: /usr/local/bin/pip: /usr/bin/python: bad interpreter: No such file or directory

你能帮我从 Ubuntu 16.04 中彻底删除 Python 2.7.13 吗?否则,您能否建议如何解决上述错误?

Could you please help me how to completely remove Python 2.7.13 from Ubuntu 16.04? Otherwise, could you please suggest how to fix the above error?

推荐答案

注意:不建议从 Ubuntu 中删除默认的 Python,它可能会导致 GDM(提供图形登录功能的图形显示管理器)失败.

caution : It is not recommended to remove the default Python from Ubuntu, it may cause GDM(Graphical Display Manager, that provide graphical login capabilities) failed.

>

要完全卸载Python2.x.x,一切都取决于它.使用这个命令:

To completely uninstall Python2.x.x and everything depends on it. use this command:

sudo apt purge python2.x-minimal

由于还有很多依赖Python2.x.x的包.所以在继续之前,你应该仔细看看 apt 想要删除的包.

As there are still a lot of packages that depend on Python2.x.x. So you should have a close look at the packages that apt wants to remove before you let it proceed.

谢谢,希望对你有帮助.

Thanks, I hope it will be helpful for you.

这篇关于如何在 Ubuntu 16.04 上完全卸载 python 2.7.13的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆