linux下安装python的第三方module
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