linux查看python安装路径,版本号
目录
linux查看python安装路径,版本号
1.查看安装路径
[hr@localhost bin]$ which python
/usr/bin/python
#ll /usr/bin/ | grep 'python'
lrwxrwxrwx. 1 root root 7 10月 17 16:52 python -> python2
lrwxrwxrwx. 1 root root 9 10月 17 16:52 python2 -> python2.7
-rwxr-xr-x. 1 root root 7216 7月 13 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.
>>>