pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: 066ce286@free.fr
To: pgsql-admin@lists.postgresql.org
Subject: Re: plpython3u and virtualenv
Date: Wed, 25 Jul 2018 15:10:25 +0200
Message-ID: <0329dd53-774f-a578-75ca-5aee271b54d4@2ndquadrant.com> (raw)
In-Reply-To: <475942886.118010533.1531988566873.JavaMail.root@zimbra82-e14.priv.proxad.net>
References: <475942886.118010533.1531988566873.JavaMail.root@zimbra82-e14.priv.proxad.net>

On 19.07.18 10:22, 066ce286@free.fr wrote:
> Do you think there is a way to make a pg server using a specific python virtualenv ?

virtualenv relies on environment settings to make it use the Python
installation in certain directories.  You could start the PostgreSQL
server inside the virtualenv.  That's not going to change which
interpreter binary it's using, since that's in the shared library
belonging to the PostgreSQL installation.  But it might make it use the
right Python module directories.  Alternatively, you could just make the
environment variable settings manually.  With a bit of experimentation
you can probably make it do useful things, but it won't match the
virtualenv experience directly.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (2+ messages)

Message-ID: <0329dd53-774f-a578-75ca-5aee271b54d4@2ndquadrant.com>
Permalink:  ../0329dd53-774f-a578-75ca-5aee271b54d4@2ndquadrant.com/
Also on:    postgresql.org/message-id/0329dd53-774f-a578-75ca-5aee271b54d4@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, 066ce286@free.fr, pgsql-admin@lists.postgresql.org
  Subject: Re: plpython3u and virtualenv
  In-Reply-To: <0329dd53-774f-a578-75ca-5aee271b54d4@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox