安裝基礎開發包
Centos 下安裝步驟如下:
yum groupinstall "Development tools" yum install zlib-devel bzip2-devel pcre-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
CentOS 自帶 Python 2.4.3,但我們可以再安裝Python2.7.5:
cd ~ wget http://python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 tar xvf Python-2.7.5.tar.bz2 cd Python-2.7.5 ./configure --prefix=/usr/local make && make altinstall
安裝Python包管理
easy_install 包 https://pypi.python.org/pypi/distribute
安裝步驟:
cd ~ wget https://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz tar xf distribute-0.6.49.tar.gz cd distribute-0.6.49 python2.7 setup.py install easy_install --version
pip 包: https://pypi.python.org/pypi/pip
安裝 pip 的好處是可以用 pip list、pip uninstall 管理 Python 包, easy_install 沒有這個功能,只