搞了个腾讯云服务器,默认是Python2.7
找了个安装Python3比较简单快速的方法,记录一下
-
1. 更新环境,这个过程比较久,大概十分钟
yum update -y
-
2. 安装Python3
yum install -y python3
-
3. 安装完验证一下,输入python3,可以看到安装的版本是3.6.8
[root@VM-0-7-centos ~]# python3
Python 3.6.8 (default, Apr 2 2020, 13:34:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
网友评论