Steve Dower <steve.do...@python.org> added the comment:

Py_Initialize() is not supposed to set it up. If you are embedding Python, you 
have to be responsible for configuring the paths that it uses - pyvenv.cfg is 
configuration for Python interactive, not the shared lib (using Windows 
terminology, it's configuration for python.exe but not python36.dll).

Personally, I am 100% against letting an embedded runtime automatically pick up 
any settings from the environment. You don't know where they came from. That 
said, I'm also in favor of making it easy for embedders to imitate the 
interactive shell's configuration.

Victor (nosied) and others are in the long process of updating embedded 
interpreter configuration to be easier to use, so adding him here as feedback, 
but I don't believe there is going to be a specific fix for this. Consider 
calling Py_SetPath before Py_Initialize to configure the search paths you want 
to use.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35706>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to