centos 7下安装python3.8

1.下载安装包 :#wget https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz
2.解压: #tar zxvf Python-3.8.7
3.执行./configure操作,检测环境。 #./configure --prefix=/usr/local/python3.8.7(指定python安装路径)
4.执行make此操作 #make (编译)
5.安装:#make install (报错: zlib not available 解决 :# yum install zlib-devel)
验证安装结果: #cd /usr/local/pyhton3.8.7 # cd bin (进入bin目录) # ./python3.8 (运行python3.8) "Ctrl+D"退出。

猜你喜欢

转载自blog.51cto.com/12772149/2597779