Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running yum/apt-get from a virtualenv

19 views
Skip to first unread message

Tiglath Suriol

unread,
Jun 24, 2016, 8:38:44 PM6/24/16
to


Let us say that I install PostgreSQL from an activated virtualenv using yum or apt-get, will PostgrSQL be local or global?

I understand that virtualenv isolates the Python environment only, so I surmise that it will make no difference installing with yum/apt-get inside or outside the virtualenv.

But that would not be the case with say Psycopg2 which would be isolated in the virtualenv, because it is a Python module. Is that right?

Thanks

Matt Wheeler

unread,
Jun 29, 2016, 6:51:14 AM6/29/16
to
On Fri, 24 Jun 2016, 03:32 Tiglath Suriol, <tiglat...@gmail.com> wrote:

> Let us say that I install PostgreSQL from an activated virtualenv using
> yum or apt-get, will PostgrSQL be local or global?
>

Global

I understand that virtualenv isolates the Python environment only, so I
> surmise that it will make no difference installing with yum/apt-get inside
> or outside the virtualenv.
>

That is correct. The way the virtualenv works is by adding a new path (the
virtualenv bin dir) to the beginning of $PATH. That means that programs
which are in your virtualenv (python, pip, entry points to any packages you
have installed) will override system versions, because they come first. Of
course that won't apply to yum,apt,etc.

But that would not be the case with say Psycopg2 which would be isolated in
> the virtualenv, because it is a Python module. Is that right?
>

Yes

>
0 new messages