如何卸载Python2.6 [英] How to uninstall Python2.6

查看:485
本文介绍了如何卸载Python2.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在预先安装了python2.6的Fedora11计算机上,我可以使用以下步骤成功安装python 2.7:

On my Fedora11 machine which has python2.6 pre-installed on it, I was able to successfully install python 2.7 using the following steps:

wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
tar -xvjf Python-2.7.tar.bz2
cd Python*
./configure --prefix=/opt/python27
make
make install
vi ~/.bash_profile
## replaced PATH=$PATH:$HOME/bin
## with PATH=$PATH:$HOME/bin:/opt/python27/bin

## reload .bash_profile
source ~/.bash_profile
echo "/opt/python27/lib" > /etc/ld.so.conf.d/python27.conf
ldconfig

但是,当我检查系统通过终端(python -V)使用的python版本时,它仍然显示python 2.6.

However, when I checked the python version the system uses via terminal (python -V), it still shows python 2.6.

如何使系统使用python2.7作为其默认python? 或者,如果可能的话,我将如何卸载python2.6?

How will I make the system use python2.7 as its default python? Or if possible, how will I uninstall python2.6?

提前谢谢!

推荐答案

卸载系统Python是一个坏主意.还有许多其他依赖于它的软件包和软件.最好通过修改$ PATH或创建一个别名来使用python2.7,例如指向您在/opt dir中安装的python的python2.7.

Uninstalling the system Python is a bad idea. There are many other packages and softwares that depend on it. It'll be better that you use python2.7 by either modifying the $PATH or creating an alias e.g. python2.7 that points to the python that you installed in /opt dir.

这篇关于如何卸载Python2.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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