1、首先需要有python環境
2、安裝pip軟件:下載地址,https://pypi.python.org/pypi/pip/6.0.8
解壓pip的壓縮包:sudo tar -zxvf pip-6.0.8.tar.gz
然后執行以下命令,安裝pip並輸入pip驗證是否安裝成功
安裝pip:sudo python pip-6.0.8/setup.py install
執行以下命令,就不會有gcc報錯(安裝python模塊時出現:error: Setup script exited with error: command 'gcc' failed with exit status 1)
具體可見:http://stackoverflow.com/questions/11094718/error-command-gcc-failed-with-exit-status-1-while-installing-eventlet
命令:sudo yum install gcc python-devel
pip安裝成功后,執行以下命令安裝第三方module的requests
sudo pip install requests
安裝MySQLdb
sudo pip install MySQL-python
