安装好Python3.7后,查看Python版本:
1.未进入python shell,两种命令:
[root@VM_0_8_centos ~]# python3 -VPython 3.7.3[root@VM_0_8_centos ~]# python --versionPython 2.7.52、直接使用python命令,进入Python环境,会自动显示其版本号。如果需要更详细的版本信息,则可以通过sys模块得到。
[root@VM_0_8_centos ~]# pythonPython 3.7.3 (default, Jun 13 2019, 17:53:09)[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import sys>>> sys.version'3.7.3 (default, Jun 13 2019, 17:53:09) n[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]'>>>也可以直接使用help命令查看到版本号。