On Fri, Dec 16, 2016 at 5:51 AM, Daniel Holth <dholth@gmail.com> wrote:
 
One possibility to consider is that virtualenv itself is a bad idea. Why should the Python interpreter executable, rather than the program being run, determine the set of packages that is available for import?

well, way back when, som eof us suggestted that pyton have pacakge version mangement built in to import:

import this_package>=2.1

or whatever.

At that time, the pyGTK and wxPython projects had done a role-your-own version of this. wxPython's was:

import wxversion
wxversion.select('2.3')
import wx

kind a kludgy, but it worked.

However, Guido, among others was pretty adamant that this was NOT python's responsibility.

Then, along came setuptools that kinda-sorta provided something like that, and then virtualenv -- and the rest is history.

I now use conda, which provides environments that manage python itself, other C libs, etc, and it works pretty well.

And there are utilities that let you run a script in a given environment:

https://github.com/pelson/conda-execute

(and maybe others)

So that does kinda pass the responsibility to the app.
 
-CHB



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov