python环境部署
- 安装依赖包
[root@localhost ~]# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc* make -y
- 下载python安装包
[root@localhost Desktop]# wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
- 解压安装包
[root@localhost Desktop]# tar -Jxvf Python-3.5.2.tar.xz
- 切入目录,进行编译安装
[root@localhost Desktop]# cd Python-3.5.2/
[root@localhost Python-3.5.2]# ./configure prefix=/usr/local/python3
[root@localhost Python-3.5.2]# make && make install
5. 配置软连接
[root@localhost Python-3.5.2]# ln -s /usr/local/python3/bin/python3 /usr/bin/python3
[root@localhost Python-3.5.2]# ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
配置完效果如下: