侧边栏壁纸
  • 累计撰写 176 篇文章
  • 累计创建 87 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

CentOS6.9升级python2.6至2.7

Z先森
2018-11-08 / 0 评论 / 0 点赞 / 11 阅读 / 0 字 / 正在检测是否收录...

####安装依赖:

yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel 

####安装python2.7:

wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
tar -zxvf Python-2.7.13.tgz
cd Python-2.7.13
./configure --prefix=/usr/local
make && make altinstall
rm -f /usr/bin/python
#然后编辑/usr/bin/yum,将第一行的#!/usr/bin/python修改成#!/usr/bin/python2.6
ln -s /usr/local/bin/python2.7 /usr/bin/python

####查看版本:

python -V

####安装pip2.7:

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
ln -s /usr/local/bin/pip2.7 /usr/bin/pip
0

评论区