Is there a "version attribute" in statsmodels?

4,318 views
Skip to first unread message

odell_wi

unread,
Aug 26, 2016, 1:20:05 PM8/26/16
to pystatsmodels
In matplotlib, numpy and pandas, there is an attribute called version that can be accessed (for example):
print  'Your matplotlib version is: %s' % mpl.__version__ 
Which would then print
Your matplotlib version is: 1.5.0
I use this in python notebooks I share with others, also in my in progress analyses along with a date string so I know when I updated the analysis and with what version of the packages.

Is there something like this in statsmodels?  Since I work at a lab that was founded in 1910, and still retains data from some of those early studies, the ability to document the provenance of the analytical tools is encouraged.  I have found statsmodels very useful for ANOVA of my experimental data.  I would like to encourage the scientists I work with to use it more-having this self-documenting capacity in the code would be a powerful feature to "market" to them. 

josef...@gmail.com

unread,
Aug 26, 2016, 1:52:45 PM8/26/16
to pystatsmodels
>>> import statsmodels.api as sm
>>> sm.version.version
'0.8.0.dev0+60bf8a1'


>>> import statsmodels
>>> statsmodels.__version__
'0.8.0.dev0+60bf8a1'

`statsmodels.api` doesn't have `__version__`. I don't know why not.


Aside: my git version number is incorrect because I didn't rebuild for
python only changes and the commit hash hasn't been updated to the
checkout that I'm currently using.


Thanks for the encouraging feedback.

Josef
Reply all
Reply to author
Forward
0 new messages