I was automating some packages requirements with ansible
and wanted to freeze their version and I found out I am not sure which version is being used by the system.
The debian apt-get
commands give a different value than the installed command invoked itself.
$ python -V
Python 2.7.6
$ dpkg -s python | grep Version
Version: 2.7.5-5ubuntu3
$ apt-cache policy python | grep Installed
Installed: 2.7.5-5ubuntu3
$ which python
/usr/bin/python
$ echo $PATH
/home/<MY_USERNAME>/.gvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
I don't think there's any $PATH
issue like getting a different python
command from stuff like anaconda
(infact that's not installed in the system). The $PATH
environment variable seems ok.
I can not get why that 2.7.6 / 2.7.5 mismatch?
My OS/distribution version:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty