[Neuroimaging] Technical details managing Python versions and packages.

Matthew Brett matthew.brett at gmail.com
Mon Aug 3 21:47:11 CEST 2015


On Mon, Aug 3, 2015 at 7:40 PM, Yaroslav Halchenko <lists at onerussian.com> wrote:
>
> On Mon, 03 Aug 2015, Matthew Brett wrote:
>
>> >> You can also easily junk a set of installs with:
>
>> >> rmvirtualenv my-env
>
>> >> How do you do that?
>
>> > not sure on specifics of this question -- "rm -rf my-env"? ;)  My
>> > virtualenvs aren't usually long-lived.
>
>> Sorry - I only meant that - if I do say apt-get install python-vtk -
>> then I will get that package and all the relevant dependencies, as
>> decided by the packager.  Then I will get those packages in all my
>> virtualenvs with ``--system-site-packages``, past and present, which
>> might change their behavior.
>
> 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.

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.


More information about the Neuroimaging mailing list