Skip to content

Commit 96031d7

Browse files
Florents-Tselaihackorum
authored andcommitted
Add tip on using virtual envs with Pl/Python
1 parent b597835 commit 96031d7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

doc/src/sgml/plpython.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,5 +1469,15 @@ plpy.execute("UPDATE tbl SET %s = %s WHERE key = %s" % (
14691469
the <command>python</command> man page are only effective in a
14701470
command-line interpreter and not an embedded Python interpreter.)
14711471
</para>
1472+
1473+
<tip>
1474+
<para>
1475+
When installing <application>PL/Python</application>,
1476+
package managers usually pick up the system-wide interpreter.
1477+
In Python it is generally recommended to use virtual environments.
1478+
In that case you can set <envar>PYTHONPATH</envar> to something like
1479+
<literal>PYTHONPATH=/path/to/venv/lib/python3.XY</literal>.
1480+
</para>
1481+
</tip>
14721482
</sect1>
14731483
</chapter>

0 commit comments

Comments
 (0)