最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CentOS6升级python到2.7版本脚本
时间:2022-06-30 21:03:26 编辑:袖梨 来源:一聚教程网
1.安装依赖包
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel wget xz -y
2.编译安装python2.7
# cd ~
# wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
# tar xvfJ Python-2.7.9.tar.xz
# cd Python-2.7.9
# ./configure --prefix=/usr/local
# make && make altinstall
# ln -s /usr/local/bin/python2.7 /usr/local/bin/python
退出SSH并重新登录
# python -V
Python 2.7.9
# which python
/usr/local/bin/python
3.安装python setuptools
# python ez_setup.py
# which easy_install
/usr/local/bin/easy_install
# /usr/local/bin/easy_install-2.7 pip
# ll /usr/local/bin
total 6136
-rwxr-xr-x 1 root root 101 Oct 29 02:34 2to3
-rwxr-xr-x 1 root root 323 Oct 29 02:42 easy_install
-rwxr-xr-x 1 root root 331 Oct 29 02:42 easy_install-2.7
-rwxr-xr-x 1 root root 99 Oct 29 02:34 idle
-rwxr-xr-x 1 root root 287 Oct 29 02:48 pip
-rwxr-xr-x 1 root root 289 Oct 29 02:48 pip2
-rwxr-xr-x 1 root root 293 Oct 29 02:48 pip2.7
-rwxr-xr-x 1 root root 84 Oct 29 02:34 pydoc
lrwxrwxrwx 1 root root 24 Oct 29 02:36 python -> /usr/local/bin/python2.7
-rwxr-xr-x 1 root root 6224569 Oct 29 02:34 python2.7
-rwxr-xr-x 1 root root 1687 Oct 29 02:34 python2.7-config
-rwxr-xr-x 1 root root 18547 Oct 29 02:34 smtpd.py
升级完毕
相关文章
- 土豆视频网页版入口-土豆视频高清在线播放 12-01
- Hitomi.la最新镜像网站入口 - 2026可用国内访问地址分享 11-26
- 土豆视频网页版入口地址-土豆视频在线播放入口 11-17
- 哔哩哔哩官方网页版入口地址-哔哩哔哩blibili手机电脑网页版入口地址 11-16
- AO3镜像网站最新入口汇总 - 2026可用镜像链接列表 11-16
- 超星学生通登录入口-超星官网网页版登录入口 11-13