I need to check python version using a python script.
I know that sys.version_info and platform.python_version() are used for the purpose but the problem is that the value they return are :
(2, 6, 6, 'final', 0) and 2.6.6
But I also need the the build number for my use-case which can be generated by rpm -qa | grep python* , e.g :
python-2.7.5-48.el7.x86_64
(build Number here being 48..) Is there any way to do it using a python script ?
-64is indicating a 64-bit architecture. If you want to get this part, you can go with @Rakesh answer.