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

查看:26
本文介绍了如何检查安装在 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天全站免登陆