Running yum/apt-get from a virtualenv
Matt Wheeler
m at funkyhat.org
Mon Jun 27 19:39:21 EDT 2016
On Fri, 24 Jun 2016, 03:32 Tiglath Suriol, <tiglathsuriol at 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
>
More information about the Python-list
mailing list