1. 程式人生 > >linux檢視python安裝路徑,版本號

linux檢視python安裝路徑,版本號

1.檢視安裝路徑

[[email protected] bin]$ which python
/usr/bin/python
#ll /usr/bin/ | grep 'python'
lrwxrwxrwx.   1 root root          7 1017 16:52 python -> python2
lrwxrwxrwx.   1 root root          9 1017 16:52 python2 -> python2.7
-rwxr-xr-x.   1 root root       7216 713 21:07 python2.7

2.檢視版本號

[[email protected] bin]$ python
Python 2.7.5 (default, Jul 13 2018, 13:06:57) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>