CentOS 6.4 安装python2

2023-01-31 02:01:53 centos 安装 6.4

安装开发工具包:

yum groupinstall "Development tools"

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel


安装python2.7:

wget Http://Python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2

tar -xf Python-2.7.3.tar.bz2 & cd Python-*

make & make altinstall


安装distribute:

wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz

tar xf distribute-0.6.35.tar.gz & cd distribute*

python2.7 setup.py install


安装ipython:

easy_install-2.7 ipython


安装Mysqldb:

yum -y install mysql-devel

easy_install-2.7 MySQL-python


相关文章