1 2 3 |
" ]yum install python26-setuptools easy_install-2.6 django easy_install-2.6 mysql_python |
#如果安裝mysql_python出現(xiàn)以下錯(cuò)誤,下先安裝gcc
#error: Setup script exited with error: command ‘gcc’ failed with exit status 1
1 |
" ]yum install gcc.i386 |
以上也可以不使用yum,直接從源碼安裝,請(qǐng)參考centos下安裝setuptools(easy_install)和MySQL-python
1 |
在運(yùn)行完第一步,就是安裝完python26-setuptools后,使用easy_install安裝django可能會(huì)出現(xiàn) 找不到命令(-bash: easy_install-2.6: command not found)的現(xiàn)象,這是因?yàn)闆](méi)有安裝setuptools的開(kāi)發(fā)包的原因,再試用yum安裝一下開(kāi)發(fā)包就OK了,命令為:
1 |
" ]yum install python26-setuptools-devel.noarch |
然后如果使用easy_install命令安裝django出現(xiàn):error: invalid Python installation: unable to open /usr/lib/python2.6/config/Makefile (No such file or directory) 的錯(cuò)誤,那么是因?yàn)闆](méi)有安裝python的開(kāi)發(fā)包,使用下面命令安裝:
1 |
" ]yum install python26-devel.i386 |
至此,就可以使用easy_install命令來(lái)安裝你想要的東西了