CentOS 6下安装Python2.7

安装方法

如果在CentOS上自己编译安装过python2.7,使用过程中会发现有些标准库没有安装之类的问题。

逛别人博客的时候发现,一个便捷的方法:使用RHSCL的全称是Red Hat Software Collections,方式安装。

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install python27

# 3. Start using software collections:
$ scl enable python27 bash

参考

原文地址:https://www.cnblogs.com/xueweihan/p/6077507.html