美文网首页
centos 6 升级python 2.7.*

centos 6 升级python 2.7.*

作者: 玩玩风行啦 | 来源:发表于2016-05-27 23:16 被阅读21次
yum install openssl openssl-devel
#python
Python 2.6.6

下载:

wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar xvf Python-2.7.11.tgz
ce Python-2.7.11
./configure
make
make install
/usr/local/bin/easy_install-2.7 pip

编辑

vim /etc/profile

追加:

alias  python="python2.7"
alias pip="pip2.7"
source /etc/profile

然后在执行python显示的就是2.7咯
升级所有pip包

pip freeze --local | grep -v '^\-e'| cut -d = -f 1  | xargs -n1 pip install -U

相关文章

网友评论

      本文标题:centos 6 升级python 2.7.*

      本文链接:https://www.haomeiwen.com/subject/dasfdttx.html