[Python-ideas] npm-style venv-aware launcher

M.-A. Lemburg mal at egenix.com
Mon Jun 1 11:05:14 CEST 2015

On 31.05.2015 18:19, David Townshend wrote:
>> The default for npm is that your package dir is attached directly to the
>> project. You can get more flexibility by setting an environment variable or
>> creating a symlink, but normally you don't. It has about the same
>> flexibility as virtualenvwrapper, with about the same amount of effort. So
>> if virtualenvwrapper isn't flexible enough for you, my guess is that your
>> take on npm won't be flexible enough either, it'll just come preconfigured
>> for your own idiosyncratic use and everyone else will have to adjust...
> You have a point.  Maybe lack of flexibility is not actually the issue -
> it's too much flexibility.  The problem that I have with virtualenv is that
> it requires quite a bit of configuration and a great deal of awareness by
> the user of what is going on and how things are configured.  As stated on
> it's home page While there is nothing specifically wrong with this, I
> usually just want a way to do something in a venv without thinking too much
> about where it is or when or how to activate it.  If you've had a look at
> the details of the sort of tool I'm proposing, it is completely
> transparent.  Perhaps the preconfiguration is just to my own
> idiosyncrasies, but if it serves its use 90% of the time then maybe that is
> good enough.

If you want to have a system that doesn't require activation,
you may want to take a look at what we've done with PyRun:


It basically takes the "virtual" out of virtualenvs. Instead
of creating a local symlinked copy of your host Python installation,
you create a completely separate Python installation (which isn't
much heavier than a virtualenv due to the way this is done).

Once installed, everything works relative to the PyRun binary,
so you don't need to activate anything when running code inside
your installation: you just need to run the right PyRun binary
and this automatically gives you access to everything else
you installed in your environment.

In our latest release, we've added requirements.txt support
to the installation helper install-pyrun, so that you can

install-pyrun -r requirements.txt .

to bootstrap a complete project environment with one command.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jun 01 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-ideas mailing list