thefourtheye's weblog

opinions are my own; try code/suggestions at your own risk

Check Python Package Version in Program

| Comments

I have always wanted to check the version of the python packages which I am using. Today I found a way to find that.

As stated here,

>>> pkg_resources.get_distribution('') 0.37 (/usr/local/lib/python2.7/dist-packages/

To get just the version, you can do

>>> pkg_resources.get_distribution('').version