下载python3.5.2
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
安装
- 解压:tar -zxvf Python-3.5.2.tgz
- 进入解压目录: cd Python-3.5.2
- 创建安装目录: mkdir /usr/local/python3.5.2
- 编译: ./configure --prefix=/usr/local/python3.5.2
- 安装: make && make install
- 备份原有python:mv /usr/bin/python /usr/bin/python_2.7.5
- 创建软连接:ln -s /usr/local/python3.5.2/bin/python3.5 /usr/bin/python
查看版本
python --version
输出
Python 3.5.2
标签:bin,centos,python,python2.7,Python,python3.5,3.5,usr From: https://blog.51cto.com/u_13991401/5923467