How to update __version__

73 views
Skip to first unread message

Brendan Barnwell

unread,
May 11, 2015, 11:33:39 PM5/11/15
to pyd...@googlegroups.com
I install pandas by pulling the repo to my local computer and using "python setup.py develop".  When I do this, the build process does not appear to correctly update whatever it is that sets pandas.__version__ .  So if I install a new version and import it, I still get an old version when I look at pandas.__version__ .

What do I have to do to get pandas to refresh its understanding of what version it is?

Goyo

unread,
May 12, 2015, 5:07:37 AM5/12/15
to pyd...@googlegroups.com
El martes, 12 de mayo de 2015, 5:33:39 (UTC+2), Brendan Barnwell escribió:
I install pandas by pulling the repo to my local computer and using "python setup.py develop".  When I do this, the build process does not appear to correctly update whatever it is that sets pandas.__version__ .  So if I install a new version and import it, I still get an old version when I look at pandas.__version__ .

What do I have to do to get pandas to refresh its understanding of what version it is?

It should be in pandas/version.py inside your python packages directory. In your case this should be a link to your checkout.

Goyo

Joris Van den Bossche

unread,
May 12, 2015, 5:27:09 AM5/12/15
to pyd...@googlegroups.com
Normally, pandas.__version__ gets updated if you do `python setuyp.py develop`. So either, there went something wrong with installing, or another installed version is picked up when you import pandas (you can check this with `pandas.__path__` to see from where it is imported)

Joris



--
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brendan Barnwell

unread,
May 12, 2015, 12:39:15 PM5/12/15
to pyd...@googlegroups.com
I found the problem.  For unreleased versions, the code in setup.py tries to get the version by using "git describe".  I don't have git.  I'm using hg-git to pull the git repo via Mercurial.

If setup.py can't find git, it just leaves in place whatever version.py was already there, ignoring the version numbers explicitly written in setup.py.  Is there a reason it was set up this way?  It would make more sense to me for the setup to use the version numbers and add "dev" or "post" or something to the version string.  It seems strange that a setup.py that knows that it is version 0.16.1 will just give up and leave an old version string in place if it can't find git.
Reply all
Reply to author
Forward
0 new messages