Author mariofutire
Recipients eric.snow, mariofutire, ncoghlan, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2018-10-10.19:28:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 10/10/2018 01:11, Steve Dower wrote:
> Steve Dower <> added the comment:
> We'll need to bring in venv specialists to check whether using it outside of Py_Main() is valid. Or perhaps you could explain what you are actually trying to do?


1) Create a virtual environment ("python -m venv")
2) Activate
2) Pip install some modules
3) Try to use them form inside an embedded application (e.g. the one I attached)
4) Do it in Linux and Windows


Works in Linux, fails in Windows.

Reason in

sys.executable is used to construct the correct search path.

Looking at the sys.path from inside an embedded application is very instructive and you can see in 
the first post why the failure in windows.

Date User Action Args
2018-10-10 19:28:14mariofutiresetrecipients: + mariofutire, paul.moore, ncoghlan, vstinner, tim.golden, eric.snow, zach.ware, steve.dower
2018-10-10 19:28:14mariofutirelinkissue34725 messages
2018-10-10 19:28:14mariofutirecreate