Getting rid of virtual environments with a better dependency system

Dan Stromberg drsalists at gmail.com
Wed Nov 11 12:34:20 EST 2020


On Wed, Nov 11, 2020 at 3:00 AM j c <jucaranlu at gmail.com> wrote:

> Hello all,
>
> I don't know if this suggestion is missing some point, or it's part of
> something already proposed before.
>
> In a professional environment, we've came to a point in which most people
> use virtual environments or code environments to avoid "polluting a global
> environment".
>
I think it'd be a good idea to have a directory (hierarchy) for each python
application, and make pip (or similar tool) download to that directory -
and then modify the _application's_ sys.path to include that directory at
the beginning.

This is what I've done with backshift (
https://stromberg.dnsalias.org/~strombrg/backshift/).  It works well,
without a need for a virtual environment, while still giving dependency
isolation.  But it's not as automatic as I'd like - I've had to manually
specify what dependencies to put in the directory.

I use virtual environments sometimes, but I always cringe slightly when
doing so. There should be a better way. This is one of the chief benefits
of languages like C, C++ and Rust over Python - they don't require you to
source something before you can run an app written in them.


More information about the Python-list mailing list