如何检查在osx和centos上安装的python的所有版本 [英] How to check all versions of python installed on osx and centos

查看:297
本文介绍了如何检查在osx和centos上安装的python的所有版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天才刚开始设置centos服务器,并注意到centos上python的默认版本设置为2.6.6.我想改用python 2.7.我四处搜寻,发现2.6.6已被YUM之类的系统工具使用,因此我不应该对其进行篡改.然后我在Mac上打开了一个终端,发现我安装了python 2.6.8、2.7.5和3.3.3.抱歉,长话短说.简而言之,我只想知道如何查找安装在centos上的所有python版本,所以我不会不小心安装两次.

I just started setting up a centos server today and noticed that the default version of python on centos is set to 2.6.6. I want to use python 2.7 instead. I googled around and found that 2.6.6 is used by system tools such as YUM so I should not tamper with it. Then I opened up a terminal on my mac and found that I had python 2.6.8 and 2.7.5 and 3.3.3 installed. Sorry for the long story. In short I just want to know how to lookup all the version of python installed on centos so I don't accidentally install it twice.

推荐答案

使用

yum list installed

命令查找已安装的软件包.

command to find the packages you installed.

这篇关于如何检查在osx和centos上安装的python的所有版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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