Centos6.5??????python2.7???pip

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos6.5??????python2.7???pip相关的知识,希望对你有一定的参考价值。

?????????root   configure   gcc   pytho   config   utc   uname   gnu   2.7   

??????Python2.7

????????????

[[email protected] ~]# cat /etc/redhat-release 
CentOS release 6.5 (Final)
[[email protected] ~]# uname -a
Linux localhost1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

 

???????????????

[[email protected] ~]# yum -y install gcc openssl-devel bzip2-devel

 

??????python?????????

[[email protected] ~]# cd /usr/src/
[[email protected] src]# wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz

 

??????

[[email protected] src]# tar xf Python-2.7.15.tgz 
[[email protected] src]# cd Python-2.7.15
[[email protected] Python-2.7.15]#

??????

????????????

[[email protected] Python-2.7.15]# ./configure --enable-optimizations
[[email protected] Python-2.7.15]# make
[[email protected] Python-2.7.15]# make altinstall

??????

????????????

[[email protected] Python-2.7.15]# /usr/local/bin/python2.7 -V
Python 2.7.15

??????

???????????????

[[email protected] Python-2.7.15]# mv /usr/bin/python{,-old}
[[email protected] Python-2.7.15]# ln -s /usr/local/bin/python2.7 /usr/bin/python

??????

??????yum

[[email protected] Python-2.7.15]# sed -i ???s/python/python-old/??? /usr/bin/yum

??????

??????pip

[[email protected] Python-2.7.15]# python -m ensurepip
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.3 setuptools-39.0.1
[[email protected] Python-2.7.15]# pip -V
pip 9.0.3 from /usr/local/lib/python2.7/site-packages (python 2.7)

 

以上是关于Centos6.5??????python2.7???pip的主要内容,如果未能解决你的问题,请参考以下文章

centos6.5系统自带python2.6升级到python2.7

CentOS6.5上安装Python2.7和PIP

centos6.5升级python2.7

CentOS6.5+Python2.7+ GIT +IPython

Centos6.5??????python2.7???pip

centos6.5+python2.7+flask+apache+mod-wsgi部署