linux查看python安装路径,版本号

1.查看安装路径

[hr@localhost 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.查看版本号

[hr@localhost 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.
>>> 

猜你喜欢

转载自blog.csdn.net/ganghaod/article/details/83115859