1、默认情况下,Linux会自带安装Python,可以运行python --version命令查看,如图:
- root@iZm5e9phbzdxx0lysrv9t2Z:~# python --version
- Python 2.7.18
- root@iZm5e9phbzdxx0lysrv9t2Z:~#
- root@iZm5e9phbzdxx0lysrv9t2Z:~# python3 --version
- Python 3.8.10
- root@iZm5e9phbzdxx0lysrv9t2Z:~#
- root@iZm5e9phbzdxx0lysrv9t2Z:~# whereis python
- python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.8-config /usr/bin/python3.8 /usr/lib/python3.9 /usr/lib/python2.7 /usr/lib/python3.8 /etc/python2.7 /etc/python3.8 /usr/local/lib/python2.7 /usr/local/lib/python3.8 /usr/include/python3.8 /usr/share/python
- root@iZm5e9phbzdxx0lysrv9t2Z:~# which python
- /usr/bin/python
- root@iZm5e9phbzdxx0lysrv9t2Z:~#
Linux系统上安装python详细步骤_普通网友的博客-CSDN博客_linux python