linux安装python3.6

2019-07-13 05:31发布

linux 安装Python3.6:
1.解压文件
tar -zxvf Python-3.6.5rc1.tgz
2.设置编译路径
./configure –prefix=/usr/local/python3
3.执行make
4.执行make install
5.建立软链接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
6.测试,输入python Python 3.6.5rc1 (default, Mar 21 2018, 00:20:45) [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 7.遇到错误zipimport.ZipImportError: can’t decompress data; zlib not available,执行下面命令,从步骤2重新执行 yum -y install zlib*