[Neuroimaging] Technical details managing Python versions and packages.

Yaroslav Halchenko lists at onerussian.com
Mon Aug 3 22:26:55 CEST 2015

On Mon, 03 Aug 2015, Matthew Brett wrote:

> > that is right!  and if my package depends on that behavior, and starts
> > to fail -- I better know that! ;)

> Yes, I can see that you might want to (potentially) disrupt old environments.

> On the other hand, imagine installing python-vtk for some reason, and
> then testing another package - A - that does not depend on vtk, but
> does import vtk.  At the moment it works, but it shouldn't, because
> the user can't rely on vtk being installed on their system.  So you
> fail to detect a missing dependency because of an accident in the
> order of your installs.

agree.  but once again -- my ultimate goal/practice is at the end to
create a debian package for those modules/packages.  That is usually
when I pin point all necessary dependencies 100% exhaustive (since
otherwise build in a clean env would fail) and have a sweep
through all supported debian/ubuntu environments to see if compatibility
is broken with any of the versions of packages they provide/support.

And if I am developing the target package, then when I decide to
use vtk, I will add it to requirements.txt.  

> But anyway - I do see that these both have advantages.  For me,
> virtualenvs with a well-stocked wheelhouse are a bit like git - once
> you've got used to them, you come to rely on quickly making a test
> environment and throwing it away afterwards.

;) yeah -- those throw away environments are really nice -- with
virtualenv, or docker or ...

but the original question I thought was more about user-side of the
story -- how to maintain a usable user/research environment, especially
whenever the desire to install/uninstall/try new stuff is pressing ;)
And for that it was my "recipe" -- as much of apt-get as possible +
virtualenv+pip (ideally with explicit list in e.g.
requirements.txt) when necessary.  I would not really recommend
system-wide or even --user installs with pip since then you let the wild
goose out ;)

Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,            Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

More information about the Neuroimaging mailing list