linux中安装python3
前言
一般linux系统都默认安装了python2,尽量不要管它,使用python3运行python脚本就好,因为linux系统费里有很多程序依赖目前的python2环境,比如ubuntu里的软件中心和yum!!!!!
不要动现有的python2环境!
1. 安装pyhon3.6
- 安装依赖环境
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-deve
或分别安装依赖环境
yum install openssl-devel -y
yum groupinstall 'Development Tools'
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel
- 下载Python3
进入官网下载(