晓夏

YoungCheung

Zhang Sir's technical way

Linux下Python安装

浏览量:821

  最近看到好多人都在问在已经存在python2.7的环境下如何安装python3,于是我决定写下这篇文档,供大家学习参考,希望能够给大家带来帮助有的人在安装的时候可能会先将python2卸载掉,这个地方严重强调一下,不要去卸载系统中已经存在的python2,否则会造成系统中好多其他需要python执行的程序异常

1.系统环境

[root@Master ~]# cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core)

2.安装python3.6

下载安装包:点击进入

wget tar xf Python-3.6.0.tgz 
cd Python-3.6.0 

## 在安装包中有一个README的文件,里面有写如何安装
./configure 
make && make install

3.测试

[root@Master Python-3.6.0]# python3
Python 3.6.0 (default, Mar 14 2017, 08:24:44) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.

神回复

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。